1
0
Fork 0
forked from External/ergo

names command

This commit is contained in:
Jeremy Latt 2014-02-17 21:02:03 -08:00
parent 046723a709
commit b17e62d0b0
4 changed files with 41 additions and 3 deletions

View file

@ -27,6 +27,7 @@ var (
LIST: NewListCommand,
MODE: NewModeCommand,
MOTD: NewMOTDCommand,
NAMES: NewNamesCommand,
NICK: NewNickCommand,
NOTICE: NewNoticeCommand,
OPER: NewOperCommand,
@ -807,3 +808,20 @@ func NewListCommand(args []string) (editableCommand, error) {
}
return cmd, nil
}
type NamesCommand struct {
BaseCommand
channels []string
target string
}
func NewNamesCommand(args []string) (editableCommand, error) {
cmd := &NamesCommand{}
if len(args) > 0 {
cmd.channels = strings.Split(args[0], ",")
}
if len(args) > 1 {
cmd.target = args[1]
}
return cmd, nil
}