Software /
code /
prosody
Diff
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 |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Wed Sep 09 19:17:29 2009 +0500 +++ b/plugins/muc/mod_muc.lua Wed Sep 09 19:28:36 2009 +0500 @@ -114,6 +114,9 @@ rooms[bare] = room; end room:handle_stanza(origin, stanza); + if not next(room._occupants) and not persistent_rooms[room.jid] then -- empty, non-persistent room + rooms[bare] = nil; -- discard room + end else --[[not for us?]] end return; end