mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +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": {
|
"KILL": {
|
||||||
handler: killHandler,
|
handler: killHandler,
|
||||||
minParams: 2,
|
minParams: 1,
|
||||||
oper: true,
|
oper: true,
|
||||||
},
|
},
|
||||||
"LIST": {
|
"LIST": {
|
||||||
|
@ -1117,7 +1117,10 @@ func timeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
// KILL <nickname> <comment>
|
// KILL <nickname> <comment>
|
||||||
func killHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
func killHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||||
nickname := msg.Params[0]
|
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))
|
target := server.clients.Get(Name(nickname))
|
||||||
if target == nil {
|
if target == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user