diff --git a/irc/config.go b/irc/config.go index 1a187604..e0e0805f 100644 --- a/irc/config.go +++ b/irc/config.go @@ -618,6 +618,7 @@ func LoadConfig(filename string) (config *Config, err error) { if !utils.IsServerName(config.Server.Name) { return nil, ErrServerNameNotHostname } + config.Server.nameCasefolded = strings.ToLower(config.Server.Name) if config.Datastore.Path == "" { return nil, ErrDatastorePathMissing } @@ -804,12 +805,6 @@ func LoadConfig(filename string) (config *Config, err error) { config.Debug.recoverFromErrors = true } - // casefold/validate server name - config.Server.nameCasefolded = strings.ToLower(config.Server.Name) - if err != nil { - return nil, fmt.Errorf("Server name isn't valid [%s]: %s", config.Server.Name, err.Error()) - } - // process operator definitions, store them to config.operators operclasses, err := config.OperatorClasses() if err != nil {