|
@@ -1152,11 +1152,16 @@ func LoadConfig(filename string) (config *Config, err error) {
|
1152
|
1152
|
}
|
1153
|
1153
|
|
1154
|
1154
|
if !config.History.Enabled || !config.History.Persistent.Enabled {
|
|
1155
|
+ config.History.Persistent.Enabled = false
|
1155
|
1156
|
config.History.Persistent.UnregisteredChannels = false
|
1156
|
1157
|
config.History.Persistent.RegisteredChannels = PersistentDisabled
|
1157
|
1158
|
config.History.Persistent.DirectMessages = PersistentDisabled
|
1158
|
1159
|
}
|
1159
|
1160
|
|
|
1161
|
+ if config.History.Persistent.Enabled && !config.Datastore.MySQL.Enabled {
|
|
1162
|
+ return nil, fmt.Errorf("You must configure a MySQL server in order to enable persistent history")
|
|
1163
|
+ }
|
|
1164
|
+
|
1160
|
1165
|
if config.History.ZNCMax == 0 {
|
1161
|
1166
|
config.History.ZNCMax = config.History.ChathistoryMax
|
1162
|
1167
|
}
|