projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e5a592
)
mod_muc: Remove room from memory when it is made non-persistent and is empty
author
Matthew Wild
<mwild1@gmail.com>
Wed, 4 May 2011 22:12:53 +0000
(23:12 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Wed, 4 May 2011 22:12:53 +0000
(23:12 +0100)
plugins/muc/mod_muc.lua
patch
|
blob
|
history
diff --git
a/plugins/muc/mod_muc.lua
b/plugins/muc/mod_muc.lua
index 329b927022f7ca33e4916c5a0acdbe92492fe576..ca2e6e20a522a9d59f546b013ec3777544fadf7c 100644
(file)
--- a/
plugins/muc/mod_muc.lua
+++ b/
plugins/muc/mod_muc.lua
@@
-58,6
+58,9
@@
local function room_save(room, forced)
room._data.history = history;
elseif forced then
datamanager.store(node, muc_host, "config", nil);
+ if not next(room._occupants) then -- Room empty
+ rooms[room.jid] = nil;
+ end
end
if forced then datamanager.store(nil, muc_host, "persistent", persistent_rooms); end
end