From 3766587466a76c53265f07bc34223834072adbe0 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 13 Jun 2010 21:54:47 +0500 Subject: MUC: Added room:set_hidden(boolean) and room:is_hidden(). --- plugins/muc/muc.lib.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 67b6dbd7..6e80235b 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -285,6 +285,16 @@ end function room_mt:is_persistent() return self._data.persistent; end +function room_mt:set_hidden(hidden) + hidden = hidden and true or nil; + if self._data.hidden ~= hidden then + self._data.hidden = hidden; + if self.save then self:save(true); end + end +end +function room_mt:is_hidden() + return self._data.hidden; +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