diff --git a/irc/config.go b/irc/config.go index e515114c..e3680ad1 100644 --- a/irc/config.go +++ b/irc/config.go @@ -686,6 +686,12 @@ func LoadConfig(filename string) (config *Config, err error) { } } + // RecoverFromErrors defaults to true + if config.Debug.RecoverFromErrors == nil { + config.Debug.RecoverFromErrors = new(bool) + *config.Debug.RecoverFromErrors = true + } + // casefold/validate server name config.Server.nameCasefolded, err = Casefold(config.Server.Name) if err != nil { diff --git a/irc/getters.go b/irc/getters.go index 7ea5f19a..6df089d5 100644 --- a/irc/getters.go +++ b/irc/getters.go @@ -29,9 +29,7 @@ func (server *Server) Password() []byte { } func (server *Server) RecoverFromErrors() bool { - // default to true if unset - rfe := server.Config().Debug.RecoverFromErrors - return rfe == nil || *rfe + return *server.Config().Debug.RecoverFromErrors } func (server *Server) ProxyAllowedFrom() []string {