aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-13 20:05:45 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-13 20:05:45 +0500
commitc31997089ef3b628985e2f475c75ae54c16bd118 (patch)
tree926aba6524bca5a010159c3833a5e490a5e1ab66 /plugins
parent169631f6efad436416fceaf9970bb16de4abc7e5 (diff)
downloadprosody-c31997089ef3b628985e2f475c75ae54c16bd118.tar.gz
prosody-c31997089ef3b628985e2f475c75ae54c16bd118.zip
MUC: Persist data in room:set_password() when called programmatically.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 38e392b5..f265f40c 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -240,8 +240,10 @@ end
function room_mt:set_password(password)
if password == "" or type(password) ~= "string" then password = nil; end
- self._data.password = password;
- return password;
+ if self._data.password ~= password then
+ self._data.password = password;
+ if self.save then self:save(true); end
+ end
end
function room_mt:get_password()
return self._data.password;