plugins/muc/muc.lib.lua
changeset 4874 4e9781a61242
parent 4839 4905aed00382
child 4875 f9fe28461101
--- a/plugins/muc/muc.lib.lua	Sun May 13 16:03:05 2012 +0100
+++ b/plugins/muc/muc.lib.lua	Sun May 13 21:07:00 2012 +0100
@@ -135,7 +135,7 @@
 		stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated)
 		local entry = { stanza = stanza, stamp = stamp };
 		t_insert(history, entry);
-		while #history > self._data.history_length do t_remove(history, 1) end
+		while #history > (self._data.history_length or default_history_length) do t_remove(history, 1) end
 	end
 end
 function room_mt:broadcast_except_nick(stanza, nick)