# HG changeset patch # User Waqas Hussain # Date 1276438743 -18000 # Node ID f8d14ea3ad0e5a78346a301350f1335f9ac9f50b # Parent ee8aaca3226ca5e1c2b0ff6df3543d5eacb4ec64 MUC: Added a password field to the room config dialog. diff -r ee8aaca3226c -r f8d14ea3ad0e plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Sun Jun 13 19:03:03 2010 +0500 +++ b/plugins/muc/muc.lib.lua Sun Jun 13 19:19:03 2010 +0500 @@ -458,6 +458,9 @@ :tag("value"):text('anyone'):up() :up() :up() + :tag("field", {type='text-private', label='Password', var='muc#roomconfig_roomsecret'}) + :tag("value"):text(self:get_password() or ""):up() + :up() ); end @@ -505,6 +508,11 @@ self._data.whois = whois module:log('debug', 'whois=%s', tostring(whois)) + local password = fields['muc#roomconfig_roomsecret']; + if password then + self:set_password(password); + end + if self.save then self:save(true); end origin.send(st.reply(stanza));