Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 3250:38402e874b45
MUC: Added room:set_moderated(boolean) and room:is_moderated().
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 13 Jun 2010 20:08:51 +0500 |
| parents | 95daf6398dbb |
| children | f2f9fe088f6e |
comparison
equal
deleted
inserted
replaced
| 3249:95daf6398dbb | 3250:38402e874b45 |
|---|---|
| 245 if self.save then self:save(true); end | 245 if self.save then self:save(true); end |
| 246 end | 246 end |
| 247 end | 247 end |
| 248 function room_mt:get_password() | 248 function room_mt:get_password() |
| 249 return self._data.password; | 249 return self._data.password; |
| 250 end | |
| 251 function room_mt:set_moderated(moderated) | |
| 252 moderated = moderated and true or nil; | |
| 253 if self._data.moderated ~= moderated then | |
| 254 self._data.moderated = | |
| 255 if self.save then self:save(true); end | |
| 256 end | |
| 257 end | |
| 258 function room_mt:is_moderated() | |
| 259 return self._data.moderated; | |
| 250 end | 260 end |
| 251 | 261 |
| 252 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc | 262 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
| 253 local from, to = stanza.attr.from, stanza.attr.to; | 263 local from, to = stanza.attr.from, stanza.attr.to; |
| 254 local room = jid_bare(to); | 264 local room = jid_bare(to); |
