engine: track the server tree so a hub SQUIT cascades
All checks were successful
CI / check (push) Successful in 3m50s
All checks were successful
CI / check (push) Successful in 3m50s
SQUIT arrives once for a splitting server (by SID), but a hub takes its whole subtree with it — users behind downstream servers were left as stale state. The parser now distinguishes a sourced downstream SERVER (tracked with its parent) from the unsourced uplink handshake, the engine keeps the SID->parent tree, and a SQUIT forgets every user across the departed server's subtree. Tree is rebuilt each link. Wire formats verified against the InspIRCd 4 m_spanningtree source.
This commit is contained in:
parent
e5e04b4130
commit
320a591ae3
5 changed files with 97 additions and 7 deletions
|
|
@ -46,8 +46,11 @@ 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
|
||||
// A downstream server was introduced (a sourced SERVER). `parent` is the SID
|
||||
// that introduced it, so we can track the tree and cascade a hub's SQUIT.
|
||||
ServerLink { sid: String, parent: String },
|
||||
// A server split away (SQUIT). `server` is its SID; every user behind it — and
|
||||
// behind any server in its subtree — 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue