forked from External/ergo
Refactor nickserv.go to better support NS HELP and translations
This commit is contained in:
parent
a39c46d470
commit
7b8c4e7e91
3 changed files with 351 additions and 218 deletions
|
|
@ -175,6 +175,14 @@ func NewServer(config *Config, logger *logger.Manager) (*Server, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// confirm help entries for NickServ exist.
|
||||
// this forces people to write help entries for every single NS command.
|
||||
for commandName, commandInfo := range nickservCommands {
|
||||
if commandInfo.help == "" || commandInfo.helpShort == "" {
|
||||
return nil, fmt.Errorf("Help entry does not exist for NickServ command %s", commandName)
|
||||
}
|
||||
}
|
||||
|
||||
// Attempt to clean up when receiving these signals.
|
||||
signal.Notify(server.signals, ServerExitSignals...)
|
||||
signal.Notify(server.rehashSignal, syscall.SIGHUP)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue