Skip to content

Commit

Permalink
fix: failed login can return a message we don't handle
Browse files Browse the repository at this point in the history
this can cause reconnect loops

Fixes #197
  • Loading branch information
pajlada committed Mar 2, 2024
1 parent e01cb7b commit 1475dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ func (c *Client) handleLine(line string) error {

func (c *Client) handleNoticeMessage(msg NoticeMessage) error {
if msg.Channel == "*" {
if msg.Message == "Login authentication failed" || msg.Message == "Improperly formatted auth" || msg.Message == "Invalid NICK" {
if msg.Message == "Login authentication failed" || msg.Message == "Improperly formatted auth" || msg.Message == "Invalid NICK" || msg.Message == "Login unsuccessful" {
return ErrLoginAuthenticationFailed
}
}
Expand Down

0 comments on commit 1475dbe

Please sign in to comment.