1
0
Fork 0
forked from External/ergo
This commit is contained in:
Shivaram Lingamneni 2020-05-17 18:06:20 -04:00
parent 1ab06949bf
commit 67150bc8f7
5 changed files with 63 additions and 13 deletions

View file

@ -254,12 +254,13 @@ type AccountConfig struct {
Exempted []string
exemptedNets []net.IPNet
} `yaml:"require-sasl"`
DefaultUserModes *string `yaml:"default-user-modes"`
defaultUserModes modes.ModeChanges
LDAP ldap.ServerConfig
LoginThrottling ThrottleConfig `yaml:"login-throttling"`
SkipServerPassword bool `yaml:"skip-server-password"`
NickReservation struct {
DefaultUserModes *string `yaml:"default-user-modes"`
defaultUserModes modes.ModeChanges
LDAP ldap.ServerConfig
LoginThrottling ThrottleConfig `yaml:"login-throttling"`
SkipServerPassword bool `yaml:"skip-server-password"`
LoginViaPassCommand bool `yaml:"login-via-pass-command"`
NickReservation struct {
Enabled bool
AdditionalNickLimit int `yaml:"additional-nick-limit"`
Method NickEnforcementMethod
@ -1078,6 +1079,9 @@ func LoadConfig(filename string) (config *Config, err error) {
if err != nil {
return nil, err
}
if config.Accounts.LoginViaPassCommand && !config.Accounts.SkipServerPassword {
return nil, errors.New("Using a server password and login-via-pass-command requires skip-server-password as well")
}
}
if config.Accounts.Registration.BcryptCost == 0 {