# HG changeset patch # User Waqas Hussain # Date 1276434798 -18000 # Node ID 616a3bb2bad9ebb4ae0d18c0a52b4adbd76fee7f # Parent dc7131d4e189640ff1f8c0c53d5ec6b5c2819d78 MUC: Added room:get_password() and room:set_password(). diff -r dc7131d4e189 -r 616a3bb2bad9 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Jun 13 04:07:38 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 18:13:18 2010 +0500 @@ -236,6 +236,15 @@ :tag('status'):text(error_message); end +function room_mt:set_password(password) + if password == "" or type(password) ~= "string" then password = nil; end + self._data.password = password; + return password; +end +function room_mt:get_password() + return self._data.password; +end + function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc local from, to = stanza.attr.from, stanza.attr.to; local room = jid_bare(to);