engine: handle inbound KILL — forget users, reintroduce bots

KILL was never parsed, so a killed user lingered in services' state (stale
session, session-limit slot, channel membership) and a killed services bot
vanished for good. The parser now surfaces UserKilled; a killed real user is
forgotten like a QUIT (shared forget_user helper), while a killed bot is
dropped and reconciled so it is reintroduced and rejoins its channels.
This commit is contained in:
Jean Chevronnet 2026-07-16 10:06:36 +00:00
parent a9a3408de0
commit 63ecd79b12
No known key found for this signature in database
4 changed files with 84 additions and 4 deletions

View file

@ -43,6 +43,9 @@ pub enum NetEvent {
// the source uid; our own changes are filtered out by the protocol layer.
TopicChange { channel: String, setter: String, topic: String },
Quit { uid: String },
// A user was forcibly removed (KILL). Handled like a quit, except a killed
// services bot is reintroduced rather than forgotten.
UserKilled { uid: 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.