diff --git a/irc/accounts.go b/irc/accounts.go index 7f3d81da..8b114411 100644 --- a/irc/accounts.go +++ b/irc/accounts.go @@ -474,8 +474,10 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames am.Unregister(casefoldedAccount, true) return ®istrationCallbackError{underlying: err} } else { - am.server.logger.Info("accounts", - fmt.Sprintf("nickname %s registered account %s, pending verification", client.Nick(), account)) + if client != nil && code != "" { + am.server.logger.Info("accounts", + fmt.Sprintf("nickname %s registered account %s, pending verification", client.Nick(), account)) + } return am.server.store.Update(func(tx *buntdb.Tx) error { _, _, err = tx.Set(verificationCodeKey, code, setOptions) return err