aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-08-11 11:36:30 +0200
committerKim Alvefur <zash@zash.se>2014-08-11 11:36:30 +0200
commitb699ac03fbf586261ecc605007993c563e15050b (patch)
tree044b088958faa04f5a0914a73e6cfd555cd40a11 /plugins
parente022111d6adec83637e0ba3b5d8a7f7dcf63bef4 (diff)
downloadprosody-b699ac03fbf586261ecc605007993c563e15050b.tar.gz
prosody-b699ac03fbf586261ecc605007993c563e15050b.zip
mod_muc: Fix tracebacks (thanks nick1)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/mod_muc.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 3f01ee11..5abde57c 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -97,11 +97,12 @@ local function restore_room(jid)
end
end
-function forget_room(jid)
- rooms[jid] = nil;
+function forget_room(room)
+ local room_jid = room.jid;
local node = jid_split(room.jid);
+ rooms[room_jid] = nil;
room_configs:set(node, nil);
- if persistent.get(room_jid) then
+ if persistent.get(room) then
persistent_rooms:set(nil, room_jid, nil);
end
end
@@ -148,8 +149,7 @@ module:hook("muc-room-pre-create", function(event)
end, -1000);
module:hook("muc-room-destroyed",function(event)
- local room = event.room
- forget_room(room.jid)
+ return forget_room(event.room);
end)
do