From c45e76460a7a77a2a119b6138f5eef94416b0372 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 21 May 2020 10:49:45 -0400 Subject: [PATCH] clean up account-notify logout notification don't need to send account-notify * (logout notification) because either we never sent the initial account-notify (if we are being logged out as part of fixupNickEqualsAccount) or else we are immediately going to kill the client (if we are being logged out as part of unregister/erase) --- irc/accounts.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/irc/accounts.go b/irc/accounts.go index 44b94bcc..ecfc4ee8 100644 --- a/irc/accounts.go +++ b/irc/accounts.go @@ -15,7 +15,6 @@ import ( "time" "unicode" - "github.com/oragono/oragono/irc/caps" "github.com/oragono/oragono/irc/connection_limits" "github.com/oragono/oragono/irc/email" "github.com/oragono/oragono/irc/ldap" @@ -1937,6 +1936,7 @@ type rawClientAccount struct { } // logoutOfAccount logs the client out of their current account. +// TODO(#1027) delete this entire method and just use client.Logout() func (am *AccountManager) logoutOfAccount(client *Client) { if client.Account() == "" { // already logged out @@ -1945,12 +1945,4 @@ func (am *AccountManager) logoutOfAccount(client *Client) { client.Logout() go client.nickTimer.Touch(nil) - - // dispatch account-notify - // TODO: doing the I/O here is kind of a kludge, let's move this somewhere else - go func() { - for friend := range client.Friends(caps.AccountNotify) { - friend.Send(nil, client.NickMaskString(), "ACCOUNT", "*") - } - }() }