3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00

move ISUPPORT regeneration to the end of config loading

This commit is contained in:
Shivaram Lingamneni 2019-09-22 17:26:50 -04:00
parent 1ce716582a
commit c1acf3ea43

View File

@ -827,11 +827,6 @@ func LoadConfig(filename string) (config *Config, err error) {
config.loadMOTD() config.loadMOTD()
err = config.generateISupport()
if err != nil {
return nil, err
}
// in the current implementation, we disable history by creating a history buffer // in the current implementation, we disable history by creating a history buffer
// with zero capacity. but the `enabled` config option MUST be respected regardless // with zero capacity. but the `enabled` config option MUST be respected regardless
// of this detail // of this detail
@ -847,5 +842,11 @@ func LoadConfig(filename string) (config *Config, err error) {
} }
} }
// now that all postprocessing is complete, regenerate ISUPPORT:
err = config.generateISupport()
if err != nil {
return nil, err
}
return config, nil return config, nil
} }