mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-22 18:24:17 +01:00
Merge pull request #1811 from slingamn/error_line
fix spurious "corrupt account creds" logline
This commit is contained in:
commit
62043afbb0
@ -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
|
var prefs AccountSettings
|
||||||
err := json.Unmarshal([]byte(rawPrefs), &prefs)
|
err := json.Unmarshal([]byte(rawPrefs), &prefs)
|
||||||
if err == nil && prefs.NickEnforcement != NickEnforcementOptional {
|
if err == nil && prefs.NickEnforcement != NickEnforcementOptional {
|
||||||
accountToMethod[account] = prefs.NickEnforcement
|
accountToMethod[account] = prefs.NickEnforcement
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
am.server.logger.Error("internal", "corrupt account creds", account)
|
am.server.logger.Error("internal", "corrupt account settings", account, err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user