forked from External/ergo
change "last signoff" tracking to "last seen"
Explicit quit and ping timeout behave the same way, but reattach after abandoning/losing the previous session (without the break being detected server-side) is more aggressive about replaying missed messages, at the cost of potential duplication.
This commit is contained in:
parent
e575b6a29f
commit
db39608bcb
7 changed files with 78 additions and 91 deletions
|
|
@ -174,7 +174,7 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
|||
if registered || !bouncerAllowed || account == "" || account != currentClient.Account() || client.HasMode(modes.TLS) != currentClient.HasMode(modes.TLS) {
|
||||
return "", errNicknameInUse
|
||||
}
|
||||
reattachSuccessful, numSessions, lastSignoff := currentClient.AddSession(session)
|
||||
reattachSuccessful, numSessions, lastSeen := currentClient.AddSession(session)
|
||||
if !reattachSuccessful {
|
||||
return "", errNicknameInUse
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
|||
operator := client.HasMode(modes.Operator) || client.HasMode(modes.LocalOperator)
|
||||
client.server.stats.AddRegistered(invisible, operator)
|
||||
}
|
||||
session.lastSignoff = lastSignoff
|
||||
session.autoreplayMissedSince = lastSeen
|
||||
// XXX SetNames only changes names if they are unset, so the realname change only
|
||||
// takes effect on first attach to an always-on client (good), but the user/ident
|
||||
// change is always a no-op (bad). we could make user/ident act the same way as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue