3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00
If history is disabled, disable the history CAPs
This commit is contained in:
Shivaram Lingamneni 2021-02-21 13:25:22 -05:00
parent 3fc277e733
commit 9e25a3027a

View File

@ -1383,6 +1383,9 @@ func LoadConfig(filename string) (config *Config, err error) {
if !config.History.Enabled { if !config.History.Enabled {
config.History.ChannelLength = 0 config.History.ChannelLength = 0
config.History.ClientLength = 0 config.History.ClientLength = 0
config.Server.supportedCaps.Disable(caps.Chathistory)
config.Server.supportedCaps.Disable(caps.EventPlayback)
config.Server.supportedCaps.Disable(caps.ZNCPlayback)
} }
if !config.History.Enabled || !config.History.Persistent.Enabled { if !config.History.Enabled || !config.History.Persistent.Enabled {