Drop a guest's GamesServ games on disconnect so a recycled uid can't inherit one
All checks were successful
CI / check (push) Successful in 5m39s

This commit is contained in:
Jean Chevronnet 2026-07-21 10:23:52 +00:00
parent 62b275fd01
commit 9e8449b40d
No known key found for this signature in database
3 changed files with 42 additions and 3 deletions

View file

@ -2463,6 +2463,11 @@ pub trait Service: Send {
fn help_topics(&self) -> (&'static str, &'static [HelpEntry]) {
("", &[])
}
// A user left the network (QUIT / KILL / netsplit). Lets a service drop any
// per-connection state it keyed on that departing uid before the uid is recycled
// to a new connection. Default: nothing to do.
fn on_user_quit(&mut self, _uid: &str) {}
fn on_command(&mut self, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, net: &dyn NetView, store: &mut dyn Store);
}