Comparison

plugins/muc/mod_muc.lua @ 1767:649dd3439809

MUC: Discard non-persistent rooms as soon as they become empty.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 09 Sep 2009 19:28:36 +0500
parent 1754:67b66eec9777
child 1780:668ce0a2050d
comparison
equal deleted inserted replaced
1766:b039538b9428 1767:649dd3439809
112 room.route_stanza = room_route_stanza; 112 room.route_stanza = room_route_stanza;
113 room.save = room_save; 113 room.save = room_save;
114 rooms[bare] = room; 114 rooms[bare] = room;
115 end 115 end
116 room:handle_stanza(origin, stanza); 116 room:handle_stanza(origin, stanza);
117 if not next(room._occupants) and not persistent_rooms[room.jid] then -- empty, non-persistent room
118 rooms[bare] = nil; -- discard room
119 end
117 else --[[not for us?]] end 120 else --[[not for us?]] end
118 return; 121 return;
119 end 122 end
120 -- to the main muc domain 123 -- to the main muc domain
121 handle_to_domain(origin, stanza); 124 handle_to_domain(origin, stanza);