Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 3254:a01c6411fdfb
MUC: Added room:set_members_only(boolean) and room:is_members_only().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 13 Jun 2010 20:37:09 +0500 |
parent | 3253:23a30abcc76e |
child | 3255:6bffb5c63131 |
comparison
equal
deleted
inserted
replaced
3253:23a30abcc76e | 3254:a01c6411fdfb |
---|---|
258 if self.save then self:save(true); end | 258 if self.save then self:save(true); end |
259 end | 259 end |
260 end | 260 end |
261 function room_mt:is_moderated() | 261 function room_mt:is_moderated() |
262 return self._data.moderated; | 262 return self._data.moderated; |
263 end | |
264 function room_mt:set_members_only(members_only) | |
265 members_only = members_only and true or nil; | |
266 if self._data.members_only ~= members_only then | |
267 self._data.members_only = members_only; | |
268 if self.save then self:save(true); end | |
269 end | |
270 end | |
271 function room_mt:is_members_only() | |
272 return self._data.members_only; | |
263 end | 273 end |
264 | 274 |
265 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc | 275 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
266 local from, to = stanza.attr.from, stanza.attr.to; | 276 local from, to = stanza.attr.from, stanza.attr.to; |
267 local room = jid_bare(to); | 277 local room = jid_bare(to); |