From 0818c7996f05566a69e100864ef5201b8920ceb8 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Wed, 19 Aug 2015 01:44:33 +0200 Subject: [PATCH] Check field before crashing IRC --- other_things/irc-old-save/irc/handlers.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/other_things/irc-old-save/irc/handlers.lua b/other_things/irc-old-save/irc/handlers.lua index c53a4df1..91f9e3fc 100755 --- a/other_things/irc-old-save/irc/handlers.lua +++ b/other_things/irc-old-save/irc/handlers.lua @@ -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)