Mercurial > prosody-hg
comparison 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 |
| parents | bdc325ce9fbc |
| children | 5b8de0731c4d |
comparison
equal
deleted
inserted
replaced
| 3360:6c07b64e972c | 3361:8d4e7c231d3e |
|---|---|
| 134 local chars = #tostring(stanza); | 134 local chars = #tostring(stanza); |
| 135 stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = muc_domain, stamp = stamp}):up(); -- XEP-0203 | 135 stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = muc_domain, stamp = stamp}):up(); -- XEP-0203 |
| 136 stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) | 136 stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) |
| 137 local entry = { stanza = stanza, stamp = stamp }; | 137 local entry = { stanza = stanza, stamp = stamp }; |
| 138 t_insert(history, entry); | 138 t_insert(history, entry); |
| 139 while #history > self._data.history_length do t_remove(history, 1) end | 139 while #history > (self._data.history_length or default_history_length) do t_remove(history, 1) end |
| 140 end | 140 end |
| 141 end | 141 end |
| 142 function room_mt:broadcast_except_nick(stanza, nick) | 142 function room_mt:broadcast_except_nick(stanza, nick) |
| 143 for rnick, occupant in pairs(self._occupants) do | 143 for rnick, occupant in pairs(self._occupants) do |
| 144 if rnick ~= nick then | 144 if rnick ~= nick then |
| 977 jid = jid; | 977 jid = jid; |
| 978 _jid_nick = {}; | 978 _jid_nick = {}; |
| 979 _occupants = {}; | 979 _occupants = {}; |
| 980 _data = { | 980 _data = { |
| 981 whois = 'moderators'; | 981 whois = 'moderators'; |
| 982 history_length = (config and config.history_length) or default_history_length; | 982 history_length = (config and config.history_length); |
| 983 }; | 983 }; |
| 984 _affiliations = {}; | 984 _affiliations = {}; |
| 985 }, room_mt); | 985 }, room_mt); |
| 986 end | 986 end |
| 987 | 987 |
