Merge 0.8->trunk
authorMatthew Wild <mwild1@gmail.com>
Wed, 04 May 2011 23:13:50 +0100
changeset 4261 b980a4173c1a
parent 4259 36ac38fd9cbd (current diff)
parent 4260 403aba5e49d5 (diff)
child 4262 fd4d1cf6d63e
Merge 0.8->trunk
--- a/plugins/muc/mod_muc.lua	Wed Apr 20 18:20:29 2011 +0100
+++ b/plugins/muc/mod_muc.lua	Wed May 04 23:13:50 2011 +0100
@@ -58,6 +58,9 @@
 		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