3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-14 07:59:31 +01:00

add a config sanity check

This commit is contained in:
Shivaram Lingamneni 2020-05-28 01:18:19 -04:00
parent d48ca682bd
commit 9177e785c5

View File

@ -927,6 +927,10 @@ func LoadConfig(filename string) (config *Config, err error) {
config.Accounts.Multiclient.AllowedByDefault = true config.Accounts.Multiclient.AllowedByDefault = true
} }
if config.Accounts.NickReservation.ForceNickEqualsAccount && !config.Accounts.Multiclient.Enabled {
return nil, errors.New("force-nick-equals-account requires enabling multiclient as well")
}
// handle guest format, including the legacy key rename-prefix // handle guest format, including the legacy key rename-prefix
if config.Accounts.NickReservation.GuestFormat == "" { if config.Accounts.NickReservation.GuestFormat == "" {
renamePrefix := config.Accounts.NickReservation.RenamePrefix renamePrefix := config.Accounts.NickReservation.RenamePrefix