mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-13 07:29:30 +01:00
KILL: Make reason optional, to match other ircds
This commit is contained in:
parent
c9a82e3f6f
commit
969eed394f
@ -85,7 +85,7 @@ var Commands = map[string]Command{
|
||||
},
|
||||
"KILL": {
|
||||
handler: killHandler,
|
||||
minParams: 2,
|
||||
minParams: 1,
|
||||
oper: true,
|
||||
},
|
||||
"LIST": {
|
||||
|
@ -1117,7 +1117,10 @@ func timeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
// KILL <nickname> <comment>
|
||||
func killHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
nickname := msg.Params[0]
|
||||
comment := msg.Params[1]
|
||||
comment := "<no reason supplied>"
|
||||
if len(msg.Params) > 1 {
|
||||
comment = msg.Params[1]
|
||||
}
|
||||
|
||||
target := server.clients.Get(Name(nickname))
|
||||
if target == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user