Software /
code /
prosody
Changeset
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 | 3249:95daf6398dbb |
children | 3251:f2f9fe088f6e |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sun Jun 13 20:05:45 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 20:08:51 2010 +0500 @@ -248,6 +248,16 @@ function room_mt:get_password() return self._data.password; end +function room_mt:set_moderated(moderated) + moderated = moderated and true or nil; + if self._data.moderated ~= moderated then + self._data.moderated = + if self.save then self:save(true); end + end +end +function room_mt:is_moderated() + return self._data.moderated; +end function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc local from, to = stanza.attr.from, stanza.attr.to;