1
0
Fork 0
forked from External/ergo

list command

This commit is contained in:
Jeremy Latt 2014-02-16 23:51:27 -08:00
parent a9d7f64693
commit f0fc3b492c
4 changed files with 59 additions and 0 deletions

View file

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