# HG changeset patch # User Kim Alvefur # Date 1407749790 -7200 # Node ID bffc885dc37820074c43f4dc8434470b2f821c28 # Parent e1a7ccd82fcedfe4a0c72e36dd9f4d47913f4ade mod_muc: Fix tracebacks (thanks nick1) diff -r e1a7ccd82fce -r bffc885dc378 plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Sun Aug 10 10:31:18 2014 +0200 +++ b/plugins/muc/mod_muc.lua Mon Aug 11 11:36:30 2014 +0200 @@ -97,11 +97,12 @@ 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 @@ end, -1000); module:hook("muc-room-destroyed",function(event) - local room = event.room - forget_room(room.jid) + return forget_room(event.room); end) do