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:
parent
efc0ce3b81
commit
a52d167278
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user