Software /
code /
prosody
Changeset
3248:f8d14ea3ad0e
MUC: Added a password field to the room config dialog.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 13 Jun 2010 19:19:03 +0500 |
parents | 3247:ee8aaca3226c |
children | 3249:95daf6398dbb |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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));