3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

Merge pull request #1018 from slingamn/account_notify

include account-notify in the response batch
This commit is contained in:
Shivaram Lingamneni 2020-05-18 01:00:27 -07:00 committed by GitHub
commit 8bebba97c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,12 @@ func sendSuccessfulAccountAuth(client *Client, rb *ResponseBuffer, forNS, forSAS
// dispatch account-notify
for friend := range client.Friends(caps.AccountNotify) {
friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
if friend != rb.session {
friend.Send(nil, details.nickMask, "ACCOUNT", details.accountName)
}
}
if rb.session.capabilities.Has(caps.AccountNotify) {
rb.Add(nil, details.nickMask, "ACCOUNT", details.accountName)
}
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))