aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
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
commit0378ffa9ba9ebb02f5a7b1afe7b39fc9a5ae871f (patch)
tree044b088958faa04f5a0914a73e6cfd555cd40a11 /plugins/muc
parente5bb501b309c646337edad211ee14c7de193464a (diff)
downloadprosody-0378ffa9ba9ebb02f5a7b1afe7b39fc9a5ae871f.tar.gz
prosody-0378ffa9ba9ebb02f5a7b1afe7b39fc9a5ae871f.zip
mod_muc: Fix tracebacks (thanks nick1)
Diffstat (limited to 'plugins/muc')
-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