3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 21:39:25 +01:00

additional defensive check in EnforcementStatus

This commit is contained in:
Shivaram Lingamneni 2019-01-03 23:44:01 -05:00
parent efc0ce3b81
commit a52d167278

View File

@ -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 {