mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
kill command
This commit is contained in:
parent
4d2d18caf1
commit
1fe73aaa9e
4 changed files with 43 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue