From a209d3f9d650e690ec1e51441a4b8ed2f9630e68 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 13 Jun 2010 20:08:51 +0500 Subject: MUC: Added room:set_moderated(boolean) and room:is_moderated(). --- plugins/muc/muc.lib.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugins/muc') 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; -- cgit v1.2.3