DebugServ: stream live services activity to the log channel

A pseudo-client that joins the staff log channel and reports what the services
layer is doing in real time: authentication (IDENTIFY and every SASL mechanism,
success and failure, with nick/host/account/reason), sessions (forced logout),
and the account/channel/operator lifecycle — the committed-event audit now
speaks through it, falling back to a server notice when it is off.

The reporting lives in the engine (feed()/who() helpers plus hooks at
complete_authenticate / sasl_login / sasl_deny); the module itself is just the
bot's identity and a STATUS/HELP surface. On by default; the feed is gated on
the configured [log] channel.
This commit is contained in:
Jean Chevronnet 2026-07-16 22:27:35 +00:00
parent 7e838cee49
commit bad17a184e
No known key found for this signature in database
9 changed files with 228 additions and 17 deletions

View file

@ -304,13 +304,20 @@ impl Engine {
for key in std::mem::take(&mut ctx.stats) {
self.bump(&key);
}
ctx.actions
let feed = if ok {
self.feed("AUTH", format!("\x0303✓\x03 {} identified to \x02{account}\x02 via IDENTIFY", self.who(&uid)))
} else {
self.feed("AUTH", format!("\x0304✗\x03 {} — IDENTIFY failed for \x02{name}\x02 (bad password)", self.who(&uid)))
};
let mut actions = ctx.actions;
actions.extend(feed);
actions
}
AuthThen::Sasl { agent, client, account } => {
if ok {
self.sasl_login(&agent, &client, account)
self.sasl_login("SASL PLAIN", &agent, &client, account)
} else {
sasl_fail(&agent, &client)
self.sasl_deny("SASL PLAIN", &agent, &client, "bad password")
}
}
}