forked from External/ergo
motd command
This commit is contained in:
parent
a203a3ca16
commit
09887b2db3
4 changed files with 75 additions and 5 deletions
|
|
@ -23,6 +23,7 @@ var (
|
|||
"ISON": NewIsOnCommand,
|
||||
"JOIN": NewJoinCommand,
|
||||
"MODE": NewModeCommand,
|
||||
"MOTD": NewMOTDCommand,
|
||||
"NICK": NewNickCommand,
|
||||
"OPER": NewOperCommand,
|
||||
"PART": NewPartCommand,
|
||||
|
|
@ -651,3 +652,16 @@ func NewIsOnCommand(args []string) (editableCommand, error) {
|
|||
nicks: args,
|
||||
}, nil
|
||||
}
|
||||
|
||||
type MOTDCommand struct {
|
||||
BaseCommand
|
||||
target string
|
||||
}
|
||||
|
||||
func NewMOTDCommand(args []string) (editableCommand, error) {
|
||||
cmd := &MOTDCommand{}
|
||||
if len(args) > 0 {
|
||||
cmd.target = args[0]
|
||||
}
|
||||
return cmd, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue