diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 19:19:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-06-13 19:19:03 +0500 |
commit | 169631f6efad436416fceaf9970bb16de4abc7e5 (patch) | |
tree | dbc0ddcf018d1feb8e29efb6e825865293567e47 /plugins | |
parent | 724e9bcad29b4d4bb75dee101d79e0504936f213 (diff) | |
download | prosody-169631f6efad436416fceaf9970bb16de4abc7e5.tar.gz prosody-169631f6efad436416fceaf9970bb16de4abc7e5.zip |
MUC: Added a password field to the room config dialog.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 7c9d081b..38e392b5 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -458,6 +458,9 @@ function room_mt:send_form(origin, stanza) :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 @@ function room_mt:process_form(origin, stanza) 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)); |