@@ -1445,7 +1445,7 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
14451445// KILL <nickname> <comment>
14461446func killHandler (server * Server , client * Client , msg ircmsg.Message , rb * ResponseBuffer ) bool {
14471447 nickname := msg .Params [0 ]
1448- comment := "<no reason supplied>"
1448+ var comment string
14491449 if len (msg .Params ) > 1 {
14501450 comment = msg .Params [1 ]
14511451 }
@@ -1458,9 +1458,18 @@ func killHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
14581458 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 ()))
14591459 }
14601460
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+ }
14621465
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 )
14641473
14651474 target .Quit (quitMsg , nil )
14661475 target .destroy (nil )
0 commit comments