Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 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 |
parent | 4839:4905aed00382 |
child | 4875:f9fe28461101 |
comparison
equal
deleted
inserted
replaced
4873:19e69cea6146 | 4874:4e9781a61242 |
---|---|
133 local stamp = datetime.datetime(); | 133 local stamp = datetime.datetime(); |
134 stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = muc_domain, stamp = stamp}):up(); -- XEP-0203 | 134 stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = muc_domain, stamp = stamp}):up(); -- XEP-0203 |
135 stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) | 135 stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) |
136 local entry = { stanza = stanza, stamp = stamp }; | 136 local entry = { stanza = stanza, stamp = stamp }; |
137 t_insert(history, entry); | 137 t_insert(history, entry); |
138 while #history > self._data.history_length do t_remove(history, 1) end | 138 while #history > (self._data.history_length or default_history_length) do t_remove(history, 1) end |
139 end | 139 end |
140 end | 140 end |
141 function room_mt:broadcast_except_nick(stanza, nick) | 141 function room_mt:broadcast_except_nick(stanza, nick) |
142 for rnick, occupant in pairs(self._occupants) do | 142 for rnick, occupant in pairs(self._occupants) do |
143 if rnick ~= nick then | 143 if rnick ~= nick then |