Software /
code /
prosody
Changeset
4874:4e9781a61242
muc.lib: Fix for traceback when no history length is set for the room
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 13 May 2012 21:07:00 +0100 |
parents | 4873:19e69cea6146 |
children | 4875:f9fe28461101 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)