mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-07-27 03:50:17 +02:00
Check field before crashing IRC
This commit is contained in:
@ -77,8 +77,11 @@ end
|
|||||||
|
|
||||||
local function needNewNick(conn, msg)
|
local function needNewNick(conn, msg)
|
||||||
local newnick = conn.nickGenerator(msg.args[2])
|
local newnick = conn.nickGenerator(msg.args[2])
|
||||||
|
if msg.nick then
|
||||||
conn:queue(msg.nick(newnick))
|
conn:queue(msg.nick(newnick))
|
||||||
end
|
end
|
||||||
|
-- Ugly hack to fix crash
|
||||||
|
end
|
||||||
|
|
||||||
-- ERR_ERRONEUSNICKNAME (Misspelt but remains for historical reasons)
|
-- ERR_ERRONEUSNICKNAME (Misspelt but remains for historical reasons)
|
||||||
handlers["432"] = needNewNick
|
handlers["432"] = needNewNick
|
||||||
|
Reference in New Issue
Block a user