|
@@ -1445,7 +1445,7 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
|
1445
|
1445
|
// KILL <nickname> <comment>
|
1446
|
1446
|
func killHandler(server *Server, client *Client, msg ircmsg.Message, rb *ResponseBuffer) bool {
|
1447
|
1447
|
nickname := msg.Params[0]
|
1448
|
|
- comment := "<no reason supplied>"
|
|
1448
|
+ var comment string
|
1449
|
1449
|
if len(msg.Params) > 1 {
|
1450
|
1450
|
comment = msg.Params[1]
|
1451
|
1451
|
}
|
|
@@ -1458,9 +1458,18 @@ func killHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
|
1458
|
1458
|
rb.Add(nil, client.server.name, ERR_UNKNOWNERROR, client.Nick(), "KILL", fmt.Sprintf(client.t("Client %s is always-on and cannot be fully removed by /KILL; consider /NS SUSPEND instead"), target.Nick()))
|
1459
|
1459
|
}
|
1460
|
1460
|
|
1461
|
|
- quitMsg := fmt.Sprintf("Killed (%s (%s))", client.nick, comment)
|
|
1461
|
+ quitMsg := "Killed"
|
|
1462
|
+ if comment != "" {
|
|
1463
|
+ quitMsg = fmt.Sprintf("Killed by %s: %s", client.Nick(), comment)
|
|
1464
|
+ }
|
1462
|
1465
|
|
1463
|
|
- server.snomasks.Send(sno.LocalKills, fmt.Sprintf(ircfmt.Unescape("%s$r was killed by %s $c[grey][$r%s$c[grey]]"), target.nick, client.nick, comment))
|
|
1466
|
+ var snoLine string
|
|
1467
|
+ if comment == "" {
|
|
1468
|
+ snoLine = fmt.Sprintf(ircfmt.Unescape("%s was killed by %s"), target.Nick(), client.Nick())
|
|
1469
|
+ } else {
|
|
1470
|
+ snoLine = fmt.Sprintf(ircfmt.Unescape("%s was killed by %s $c[grey][$r%s$c[grey]]"), target.Nick(), client.Nick(), comment)
|
|
1471
|
+ }
|
|
1472
|
+ server.snomasks.Send(sno.LocalKills, snoLine)
|
1464
|
1473
|
|
1465
|
1474
|
target.Quit(quitMsg, nil)
|
1466
|
1475
|
target.destroy(nil)
|