Check field before crashing IRC

This commit is contained in:
LeMagnesium 2015-08-19 01:44:33 +02:00
parent ba5d1476c0
commit 0818c7996f
1 changed files with 4 additions and 1 deletions

View File

@ -77,7 +77,10 @@ end
local function needNewNick(conn, msg)
local newnick = conn.nickGenerator(msg.args[2])
conn:queue(msg.nick(newnick))
if msg.nick then
conn:queue(msg.nick(newnick))
end
-- Ugly hack to fix crash
end
-- ERR_ERRONEUSNICKNAME (Misspelt but remains for historical reasons)