engine: part a bot when its channel expires
All checks were successful
CI / check (push) Successful in 3m47s

Command-driven channel drops reconcile bots via the dispatch path, but the
inactivity-expiry sweep runs outside it — so a bot assigned to an expired
(or expired-founder-orphaned) channel lingered there until the next
netburst. The sweep now reconciles at the end, parting any stranded bot.
This commit is contained in:
Jean Chevronnet 2026-07-16 08:27:59 +00:00
parent fa55bc3e3a
commit bbea17e848
No known key found for this signature in database
2 changed files with 50 additions and 0 deletions

View file

@ -576,6 +576,13 @@ impl Engine {
}
}
}
// A channel dropped above — expired, or orphaned by an expired founder —
// takes its assigned bot with it. Command-driven drops reconcile via the
// dispatch path, but this sweep runs outside it, so reconcile here or the
// bot lingers in a channel it no longer serves until the next netburst.
for action in self.reconcile_bots() {
self.emit_irc(action);
}
}
// The news items of `kind` as server-sourced notices to `uid`, each tagged