Skip to content

Commit

Permalink
Make kick messages default to the kicker name instead of the kicked
Browse files Browse the repository at this point in the history
For consistency with RFC2812, Bahamut, Hybrid, Insp, Plexus4, Unreal.
https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.8

At the expense of consistency with chary/solanum, irc2, and ircu2.
  • Loading branch information
progval committed Aug 13, 2021
1 parent 5d2d4a9 commit f33f41b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions irc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,9 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
if len(msg.Params) > 2 {
comment = msg.Params[2]
}
if comment == "" {
comment = client.Nick()
}
for _, kick := range kicks {
channel := server.channels.Get(kick.channel)
if channel == nil {
Expand All @@ -1385,10 +1388,6 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
rb.Add(nil, server.name, ERR_NOSUCHNICK, client.nick, utils.SafeErrorParam(kick.nick), client.t("No such nick"))
continue
}

if comment == "" {
comment = kick.nick
}
channel.Kick(client, target, comment, rb, hasPrivs)
}
return false
Expand Down

0 comments on commit f33f41b

Please sign in to comment.