From 61bce7401854a2b582b5cce5777ad1641ebd3188 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 1 Nov 2021 18:48:37 -0400 Subject: [PATCH] fix spurious "corrupt account creds" logline Reported by @tacerus. This was most likely introduced by 8b2f6de3e. --- irc/accounts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/accounts.go b/irc/accounts.go index 8f8e8b45..791f420c 100644 --- a/irc/accounts.go +++ b/irc/accounts.go @@ -177,13 +177,13 @@ func (am *AccountManager) buildNickToAccountIndex(config *Config) { } } - if rawPrefs, err := tx.Get(fmt.Sprintf(keyAccountSettings, account)); err == nil { + if rawPrefs, err := tx.Get(fmt.Sprintf(keyAccountSettings, account)); err == nil && rawPrefs != "" { var prefs AccountSettings err := json.Unmarshal([]byte(rawPrefs), &prefs) if err == nil && prefs.NickEnforcement != NickEnforcementOptional { accountToMethod[account] = prefs.NickEnforcement } else if err != nil { - am.server.logger.Error("internal", "corrupt account creds", account) + am.server.logger.Error("internal", "corrupt account settings", account, err.Error()) } }