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" )