1
0
Fork 0
forked from External/ergo
This commit is contained in:
Shivaram Lingamneni 2020-08-23 18:10:01 -04:00
parent 4c0144c708
commit 6628a3d1c6
3 changed files with 11 additions and 2 deletions

View file

@ -1152,11 +1152,16 @@ func LoadConfig(filename string) (config *Config, err error) {
}
if !config.History.Enabled || !config.History.Persistent.Enabled {
config.History.Persistent.Enabled = false
config.History.Persistent.UnregisteredChannels = false
config.History.Persistent.RegisteredChannels = PersistentDisabled
config.History.Persistent.DirectMessages = PersistentDisabled
}
if config.History.Persistent.Enabled && !config.Datastore.MySQL.Enabled {
return nil, fmt.Errorf("You must configure a MySQL server in order to enable persistent history")
}
if config.History.ZNCMax == 0 {
config.History.ZNCMax = config.History.ChathistoryMax
}