1
0
Fork 0
forked from External/ergo

allow SAREGISTER even when normal registration is fully disabled

This commit is contained in:
Shivaram Lingamneni 2019-02-14 19:51:55 -05:00
parent 355491d4e1
commit d147708158
5 changed files with 17 additions and 11 deletions

View file

@ -307,6 +307,12 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames
}
config := am.server.AccountConfig()
// final "is registration allowed" check, probably redundant:
if !(config.Registration.Enabled || callbackNamespace == "admin") {
return errFeatureDisabled
}
// if nick reservation is enabled, you can only register your current nickname
// as an account; this prevents "land-grab" situations where someone else
// registers your nick out from under you and then NS GHOSTs you