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

include account-notify in the response batch

This commit is contained in:
Shivaram Lingamneni 2020-05-17 11:52:32 -04:00
parent 1ab06949bf
commit 855eb786af

View File

@ -102,8 +102,13 @@ func sendSuccessfulAccountAuth(client *Client, rb *ResponseBuffer, forNS, forSAS
// dispatch account-notify
for friend := range client.Friends(caps.AccountNotify) {
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))