Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 3361:8d4e7c231d3e
MUC: Fixed a traceback introduced in hg:bdc325ce9fbc.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 14 Jul 2010 19:48:01 +0500 |
parent | 3330:bdc325ce9fbc |
child | 3393:5b8de0731c4d |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Wed Jul 14 15:32:14 2010 +0100 +++ b/plugins/muc/muc.lib.lua Wed Jul 14 19:48:01 2010 +0500 @@ -136,7 +136,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) @@ -979,7 +979,7 @@ _occupants = {}; _data = { whois = 'moderators'; - history_length = (config and config.history_length) or default_history_length; + history_length = (config and config.history_length); }; _affiliations = {}; }, room_mt);