engine: forget a split server's users on SQUIT
All checks were successful
CI / check (push) Successful in 3m47s

A netsplit is signalled once via SQUIT, not as a QUIT per user, so every
user behind the departed server lingered in services' state — stale
sessions, session-limit slots, and channel memberships. The parser now
surfaces ServerSplit and the engine forgets every uid carrying that
server's SID prefix, leaving other servers' users untouched.
This commit is contained in:
Jean Chevronnet 2026-07-16 10:10:20 +00:00
parent 63ecd79b12
commit 4aff734340
No known key found for this signature in database
5 changed files with 49 additions and 0 deletions

View file

@ -46,6 +46,10 @@ pub enum NetEvent {
// A user was forcibly removed (KILL). Handled like a quit, except a killed
// services bot is reintroduced rather than forgotten.
UserKilled { uid: String },
// A server split away (SQUIT). `server` is its SID; every user behind it
// (whose uid carries that SID prefix) is gone, since a split is signalled once
// rather than as a QUIT per user.
ServerSplit { server: String },
// An ircd relaying an IRCv3 account-registration request to us as the authority.
AccountRequest { reqid: String, origin: String, kind: String, account: String, p2: String, p3: String },
// An ircd relaying a SASL exchange step to us (the SASL agent). mode = H/S/C/D.