Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
We intended to suppress 324 and 329 when there is no valid mode change, only
unknown modes. Fix these checks.
  • Loading branch information
slingamn committed Feb 4, 2025
1 parent 07669f9 commit 8fa6e19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions irc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ func cmodeHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respon
for _, char := range unknown {
rb.Add(nil, server.name, ERR_UNKNOWNMODE, client.nick, string(char), client.t("is an unknown mode character to me"))
}
if len(unknown) == 1 && len(changes) == 0 {
if len(unknown) != 0 && len(changes) == 0 {
return false
}
}
Expand Down Expand Up @@ -1946,7 +1946,7 @@ func umodeHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respon
for _, char := range unknown {
rb.Add(nil, server.name, ERR_UNKNOWNMODE, cDetails.nick, string(char), client.t("is an unknown mode character to me"))
}
if len(unknown) == 1 && len(changes) == 0 {
if len(unknown) != 0 && len(changes) == 0 {
return false
}

Expand Down

0 comments on commit 8fa6e19

Please sign in to comment.