forked from External/ergo
list command
This commit is contained in:
parent
a9d7f64693
commit
f0fc3b492c
4 changed files with 59 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ var (
|
|||
ISON: NewIsOnCommand,
|
||||
JOIN: NewJoinCommand,
|
||||
KICK: NewKickCommand,
|
||||
LIST: NewListCommand,
|
||||
MODE: NewModeCommand,
|
||||
MOTD: NewMOTDCommand,
|
||||
NICK: NewNickCommand,
|
||||
|
|
@ -778,3 +779,20 @@ func NewKickCommand(args []string) (editableCommand, error) {
|
|||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
type ListCommand struct {
|
||||
BaseCommand
|
||||
channels []string
|
||||
target string
|
||||
}
|
||||
|
||||
func NewListCommand(args []string) (editableCommand, error) {
|
||||
cmd := &ListCommand{}
|
||||
if len(args) > 0 {
|
||||
cmd.channels = strings.Split(args[0], ",")
|
||||
}
|
||||
if len(args) > 1 {
|
||||
cmd.target = args[1]
|
||||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue