Browse Source

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)
tags/v2.1.0-rc1
Shivaram Lingamneni 4 years ago
parent
commit
c45e76460a
1 changed files with 1 additions and 9 deletions
  1. 1
    9
      irc/accounts.go

+ 1
- 9
irc/accounts.go View File

@@ -15,7 +15,6 @@ import (
15 15
 	"time"
16 16
 	"unicode"
17 17
 
18
-	"github.com/oragono/oragono/irc/caps"
19 18
 	"github.com/oragono/oragono/irc/connection_limits"
20 19
 	"github.com/oragono/oragono/irc/email"
21 20
 	"github.com/oragono/oragono/irc/ldap"
@@ -1937,6 +1936,7 @@ type rawClientAccount struct {
1937 1936
 }
1938 1937
 
1939 1938
 // logoutOfAccount logs the client out of their current account.
1939
+// TODO(#1027) delete this entire method and just use client.Logout()
1940 1940
 func (am *AccountManager) logoutOfAccount(client *Client) {
1941 1941
 	if client.Account() == "" {
1942 1942
 		// already logged out
@@ -1945,12 +1945,4 @@ func (am *AccountManager) logoutOfAccount(client *Client) {
1945 1945
 
1946 1946
 	client.Logout()
1947 1947
 	go client.nickTimer.Touch(nil)
1948
-
1949
-	// dispatch account-notify
1950
-	// TODO: doing the I/O here is kind of a kludge, let's move this somewhere else
1951
-	go func() {
1952
-		for friend := range client.Friends(caps.AccountNotify) {
1953
-			friend.Send(nil, client.NickMaskString(), "ACCOUNT", "*")
1954
-		}
1955
-	}()
1956 1948
 }

Loading…
Cancel
Save