# HG changeset patch # User Matthew Wild # Date 1274274694 -3600 # Node ID 1849614af19ade5a6689f520668413e6e0231e4d # Parent 31e24026e4fdbc9f6f1898bdb9940eb71cac243e mod_ircd: Log error when receiving a message without a valid nick diff -r 31e24026e4fd -r 1849614af19a mod_ircd/mod_ircd.lua --- a/mod_ircd/mod_ircd.lua Wed May 19 14:02:19 2010 +0100 +++ b/mod_ircd/mod_ircd.lua Wed May 19 14:11:34 2010 +0100 @@ -154,13 +154,16 @@ local body = stanza:get_child("body"); body = body and body:get_text() or ""; local hasdelay = stanza:get_child("delay", "urn:xmpp:delay"); - if body ~= "" then + if body ~= "" and nick then for session in pairs(joined_muc.sessions) do if nick ~= session.nick or hasdelay then session.send(":"..nick.." PRIVMSG "..from_node.." :"..body); end end end + if not nick then + module:log("error", "Invalid nick from JID: %s", from); + end end end end