mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-29 15:40:02 +01:00
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)
This commit is contained in:
parent
9d8b71b920
commit
c45e76460a
@ -15,7 +15,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/oragono/oragono/irc/caps"
|
|
||||||
"github.com/oragono/oragono/irc/connection_limits"
|
"github.com/oragono/oragono/irc/connection_limits"
|
||||||
"github.com/oragono/oragono/irc/email"
|
"github.com/oragono/oragono/irc/email"
|
||||||
"github.com/oragono/oragono/irc/ldap"
|
"github.com/oragono/oragono/irc/ldap"
|
||||||
@ -1937,6 +1936,7 @@ type rawClientAccount struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// logoutOfAccount logs the client out of their current account.
|
// 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) {
|
func (am *AccountManager) logoutOfAccount(client *Client) {
|
||||||
if client.Account() == "" {
|
if client.Account() == "" {
|
||||||
// already logged out
|
// already logged out
|
||||||
@ -1945,12 +1945,4 @@ func (am *AccountManager) logoutOfAccount(client *Client) {
|
|||||||
|
|
||||||
client.Logout()
|
client.Logout()
|
||||||
go client.nickTimer.Touch(nil)
|
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", "*")
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user