Software / code / prosody
Comparison
plugins/muc/muc.lib.lua @ 7362:032fcb7b80a1
MUC: Use config passed to rew_roow()
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 18 Apr 2016 14:54:01 +0200 |
| parent | 7360:7a37fade5380 |
| child | 7363:14170d161b39 |
comparison
equal
deleted
inserted
replaced
| 7361:3409773ca19a | 7362:032fcb7b80a1 |
|---|---|
| 1221 room_mt.get_whois = whois.get; | 1221 room_mt.get_whois = whois.get; |
| 1222 room_mt.set_whois = whois.set; | 1222 room_mt.set_whois = whois.set; |
| 1223 | 1223 |
| 1224 local _M = {}; -- module "muc" | 1224 local _M = {}; -- module "muc" |
| 1225 | 1225 |
| 1226 function _M.new_room(jid, config) -- luacheck: ignore 212 | 1226 function _M.new_room(jid, config) |
| 1227 -- TODO use config? | |
| 1228 return setmetatable({ | 1227 return setmetatable({ |
| 1229 jid = jid; | 1228 jid = jid; |
| 1230 _jid_nick = {}; | 1229 _jid_nick = {}; |
| 1231 _occupants = {}; | 1230 _occupants = {}; |
| 1232 _data = { | 1231 _data = config or {}; |
| 1233 }; | |
| 1234 _affiliations = {}; | 1232 _affiliations = {}; |
| 1235 }, room_mt); | 1233 }, room_mt); |
| 1236 end | 1234 end |
| 1237 | 1235 |
| 1238 function room_mt:freeze() | 1236 function room_mt:freeze() |