mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-15 00:19:29 +01:00
make SAREGISTER override DEFCON
DEFCON 4 and lower were blocking SAREGISTER. This is wrong; admins should be allowed to make new accounts even under DEFCON (this may be needed specifically to work around the DEFCON restriction).
This commit is contained in:
parent
4010f3fc02
commit
9f6e26450b
@ -356,7 +356,7 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames
|
||||
config := am.server.Config()
|
||||
|
||||
// final "is registration allowed" check:
|
||||
if !(config.Accounts.Registration.Enabled || callbackNamespace == "admin") || am.server.Defcon() <= 4 {
|
||||
if callbackNamespace != "admin" && (!config.Accounts.Registration.Enabled || am.server.Defcon() <= 4) {
|
||||
return errFeatureDisabled
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user