mirror of
https://github.com/jeremyd/ergo.git
synced 2026-04-28 08:29:59 -07:00
Refactor nickserv.go to better support NS HELP and translations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user