aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/muc')
-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;