mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-15 12:24:47 -07:00
additional defensive check in EnforcementStatus
This commit is contained in:
@@ -187,6 +187,10 @@ func (am *AccountManager) EnforcementStatus(nick string) (account string, method
|
|||||||
defer am.RUnlock()
|
defer am.RUnlock()
|
||||||
|
|
||||||
account = am.nickToAccount[cfnick]
|
account = am.nickToAccount[cfnick]
|
||||||
|
if account == "" {
|
||||||
|
method = NickReservationNone
|
||||||
|
return
|
||||||
|
}
|
||||||
method = am.accountToMethod[account]
|
method = am.accountToMethod[account]
|
||||||
// if they don't have a custom setting, or customization is disabled, use the default
|
// if they don't have a custom setting, or customization is disabled, use the default
|
||||||
if method == NickReservationOptional || !config.Accounts.NickReservation.AllowCustomEnforcement {
|
if method == NickReservationOptional || !config.Accounts.NickReservation.AllowCustomEnforcement {
|
||||||
|
|||||||
Reference in New Issue
Block a user