kill command

This commit is contained in:
Jeremy Latt 2014-02-25 09:10:16 -08:00
parent 4d2d18caf1
commit 1fe73aaa9e
4 changed files with 43 additions and 2 deletions

View file

@ -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
}