forked from External/ergo
Make kick messages default to the kicker name instead of the kicked
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.
This commit is contained in:
parent
37fbf4c4dd
commit
a24b31cbd6
1 changed files with 3 additions and 4 deletions
|
|
@ -1334,6 +1334,9 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
|
||||||
if len(msg.Params) > 2 {
|
if len(msg.Params) > 2 {
|
||||||
comment = msg.Params[2]
|
comment = msg.Params[2]
|
||||||
}
|
}
|
||||||
|
if comment == "" {
|
||||||
|
comment = client.Nick()
|
||||||
|
}
|
||||||
for _, kick := range kicks {
|
for _, kick := range kicks {
|
||||||
channel := server.channels.Get(kick.channel)
|
channel := server.channels.Get(kick.channel)
|
||||||
if channel == nil {
|
if channel == nil {
|
||||||
|
|
@ -1346,10 +1349,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"))
|
rb.Add(nil, server.name, ERR_NOSUCHNICK, client.nick, utils.SafeErrorParam(kick.nick), client.t("No such nick"))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if comment == "" {
|
|
||||||
comment = kick.nick
|
|
||||||
}
|
|
||||||
channel.Kick(client, target, comment, rb, hasPrivs)
|
channel.Kick(client, target, comment, rb, hasPrivs)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue