Browse Source

Merge pull request #1018 from slingamn/account_notify

include account-notify in the response batch
tags/v2.1.0-rc1
Shivaram Lingamneni 4 years ago
parent
commit
8bebba97c3
No account linked to committer's email address
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      irc/handlers.go

+ 6
- 1
irc/handlers.go View File

@@ -102,7 +102,12 @@ func sendSuccessfulAccountAuth(client *Client, rb *ResponseBuffer, forNS, forSAS
102 102
 
103 103
 	// dispatch account-notify
104 104
 	for friend := range client.Friends(caps.AccountNotify) {
105
-		friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
105
+		if friend != rb.session {
106
+			friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
107
+		}
108
+	}
109
+	if rb.session.capabilities.Has(caps.AccountNotify) {
110
+		rb.Add(nil, details.nickMask, "ACCOUNT", details.accountName)
106 111
 	}
107 112
 
108 113
 	client.server.snomasks.Send(sno.LocalAccounts, fmt.Sprintf(ircfmt.Unescape("Client $c[grey][$r%s$c[grey]] logged into account $c[grey][$r%s$c[grey]]"), details.nickMask, details.accountName))

Loading…
Cancel
Save