Skip to content

Commit

Permalink
Merge pull request #1776 from ProgVal/kick-default-comment
Browse files Browse the repository at this point in the history
Make kick messages default to the kicker name instead of the kicked
  • Loading branch information
slingamn committed Aug 13, 2021
2 parents 4785a39 + f33f41b commit 0d438dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions irc/handlers.go
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 0d438dd

Please sign in to comment.