diff --git a/irc/config.go b/irc/config.go index 634ac5f5..fd997512 100644 --- a/irc/config.go +++ b/irc/config.go @@ -1611,7 +1611,7 @@ func LoadConfig(filename string) (config *Config, err error) { // in the current implementation, we disable history by creating a history buffer // with zero capacity. but the `enabled` config option MUST be respected regardless // of this detail - if !config.History.Enabled { + if !config.History.Enabled || config.History.ChathistoryMax == 0 { config.History.ChannelLength = 0 config.History.ClientLength = 0 config.Server.supportedCaps.Disable(caps.Chathistory) diff --git a/irc/server.go b/irc/server.go index d1cf736e..3c763593 100644 --- a/irc/server.go +++ b/irc/server.go @@ -908,6 +908,9 @@ func (server *Server) applyConfig(config *Config) (err error) { if config.Accounts.RequireSasl.Enabled && config.Accounts.Registration.Enabled { server.logger.Warning("server", "Warning: although require-sasl is enabled, users can still register accounts. If your server is not intended to be public, you must set accounts.registration.enabled to false.") } + if config.History.Enabled && config.History.ChathistoryMax == 0 { + server.logger.Warning("server", "Warning: for history to work correctly, you must set history.chathistory-maxmessages (see default.yaml for a recommendation).") + } return err }