mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +01:00
additional defensive check in EnforcementStatus
This commit is contained in:
parent
efc0ce3b81
commit
a52d167278
@ -187,6 +187,10 @@ func (am *AccountManager) EnforcementStatus(nick string) (account string, method
|
||||
defer am.RUnlock()
|
||||
|
||||
account = am.nickToAccount[cfnick]
|
||||
if account == "" {
|
||||
method = NickReservationNone
|
||||
return
|
||||
}
|
||||
method = am.accountToMethod[account]
|
||||
// if they don't have a custom setting, or customization is disabled, use the default
|
||||
if method == NickReservationOptional || !config.Accounts.NickReservation.AllowCustomEnforcement {
|
||||
|
Loading…
Reference in New Issue
Block a user