Software /
code /
prosody
Changeset
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 |
parents | 1766:b039538b9428 |
children | 1768:802c40384dd0 |
files | plugins/muc/mod_muc.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
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