diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 20:08:51 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 20:08:51 +0500 |
commit | a209d3f9d650e690ec1e51441a4b8ed2f9630e68 (patch) | |
tree | c99499984f8b8b831bfb6247ac5ffe137331cb25 /plugins | |
parent | c31997089ef3b628985e2f475c75ae54c16bd118 (diff) | |
download | prosody-a209d3f9d650e690ec1e51441a4b8ed2f9630e68.tar.gz prosody-a209d3f9d650e690ec1e51441a4b8ed2f9630e68.zip |
MUC: Added room:set_moderated(boolean) and room:is_moderated().
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index f265f40c..6e50a9b3 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -248,6 +248,16 @@ end 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; |