Add ErrNicknameInUse constant

This commit is contained in:
Ken-Håvard Lieng 2017-04-06 23:31:11 +02:00
parent 961c0415a0
commit b2263a4527
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -32,4 +32,5 @@ const (
ReplyMotd = "372"
ReplyMotdStart = "375"
ReplyEndOfMotd = "376"
ErrNicknameInUse = "433"
)