From b2263a452705c934897a596c4eb5cc4cb73aa140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Thu, 6 Apr 2017 23:31:11 +0200 Subject: [PATCH] Add ErrNicknameInUse constant --- irc/conn.go | 2 +- irc/const.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/irc/conn.go b/irc/conn.go index 2f09420f..5bab21ab 100644 --- a/irc/conn.go +++ b/irc/conn.go @@ -189,7 +189,7 @@ func (c *Client) recv() { case ReplyWelcome: c.once.Do(c.ready.Done) - case "433": + case ErrNicknameInUse: if c.HandleNickInUse != nil { c.nick = c.HandleNickInUse(c.nick) c.writeNick(c.nick) diff --git a/irc/const.go b/irc/const.go index d2c053e3..87fd6a7b 100644 --- a/irc/const.go +++ b/irc/const.go @@ -32,4 +32,5 @@ const ( ReplyMotd = "372" ReplyMotdStart = "375" ReplyEndOfMotd = "376" + ErrNicknameInUse = "433" )