irc: remove duplicate NICK handler in handleLine

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-09-20 03:09:03 +03:00
parent 36dd81ce1c
commit 5cec4d8bb1

View File

@@ -656,14 +656,6 @@ function IrcChatView:handleLine(line)
end
end
return
elseif command == "NICK" then -- someone changed nick; update ours if it's us
local newnick = rest:match("^:(.+)$") or rest
local oldnick = prefix:match("^([^!]+)!") or prefix
if oldnick == self._nick and newnick and #newnick > 0 then
self._nick = newnick
self:appendLine(T(_("You are now known as %1"), newnick))
end
return
elseif command == "376" or command == "422" then
-- End of MOTD / No MOTD: safe to join if not yet joined
if not self._registered then self._registered = true end