mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-23 07:38:10 -07:00
kill command
This commit is contained in:
@@ -33,6 +33,7 @@ var (
|
||||
ISON: NewIsOnCommand,
|
||||
JOIN: NewJoinCommand,
|
||||
KICK: NewKickCommand,
|
||||
KILL: NewKillCommand,
|
||||
LIST: NewListCommand,
|
||||
MODE: NewModeCommand,
|
||||
MOTD: NewMOTDCommand,
|
||||
@@ -946,3 +947,19 @@ func NewTimeCommand(args []string) (editableCommand, error) {
|
||||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
type KillCommand struct {
|
||||
BaseCommand
|
||||
nickname string
|
||||
comment string
|
||||
}
|
||||
|
||||
func NewKillCommand(args []string) (editableCommand, error) {
|
||||
if len(args) < 2 {
|
||||
return nil, NotEnoughArgsError
|
||||
}
|
||||
return &KillCommand{
|
||||
nickname: args[0],
|
||||
comment: args[1],
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user