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