Mercurial > prosody-hg
comparison plugins/mod_muc.lua @ 822:a82eadc415ff
MUC: Logging - logger doesn't like nils
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Thu, 19 Feb 2009 14:10:26 +0500 |
| parents | c20545c0dc4d |
| children | b6ee70721783 |
comparison
equal
deleted
inserted
replaced
| 820:c20545c0dc4d | 822:a82eadc415ff |
|---|---|
| 224 function handle_to_occupant(origin, stanza) -- PM, vCards, etc | 224 function handle_to_occupant(origin, stanza) -- PM, vCards, etc |
| 225 local from, to = stanza.attr.from, stanza.attr.to; | 225 local from, to = stanza.attr.from, stanza.attr.to; |
| 226 local room = jid_bare(to); | 226 local room = jid_bare(to); |
| 227 local current_nick = jid_nick:get(from, room); | 227 local current_nick = jid_nick:get(from, room); |
| 228 local type = stanza.attr.type; | 228 local type = stanza.attr.type; |
| 229 log("debug", "room: %s, current_nick: %s, stanza: %s", room, current_nick, stanza:top_tag()); | 229 log("debug", "room: %s, current_nick: %s, stanza: %s", room or "nil", current_nick or "nil", stanza:top_tag()); |
| 230 if stanza.name == "presence" then | 230 if stanza.name == "presence" then |
| 231 local pr = get_filtered_presence(stanza); | 231 local pr = get_filtered_presence(stanza); |
| 232 pr.attr.from = to; | 232 pr.attr.from = to; |
| 233 if type == "error" then -- error, kick em out! | 233 if type == "error" then -- error, kick em out! |
| 234 if current_nick then | 234 if current_nick then |
