Add a staff audit feed for notable service actions

A [log] channel now receives a one-line announcement of each notable
state change a service command makes — registrations, drops, vhosts,
suspensions, akicks, access and founder changes, bot and oper host-config
changes — naming the actor (by nick, plus account when it differs) and
what changed. The feed reads the typed event log directly: dispatch marks
the log before running a command and diffs it after, so each announcement
is exactly that command's footprint, sourced from the services server so
it reaches the channel without a pseudo-client having to be present.

Private and cosmetic events are deliberately never surfaced: memo bodies,
password/verifier material, greets, auto-join, personal and channel
cosmetic settings. Omitting [log] disables the feed.
This commit is contained in:
Jean Chevronnet 2026-07-13 23:48:23 +00:00
parent 34892dbba7
commit 698d604954
No known key found for this signature in database
5 changed files with 184 additions and 0 deletions

View file

@ -26,6 +26,16 @@ pub struct Config {
// Services operators: accounts granted privileges. Absent = no opers.
#[serde(default)]
pub oper: Vec<Oper>,
// Staff audit feed. Absent = no audit log is emitted.
#[serde(default)]
pub log: Option<Log>,
}
// The staff audit feed: notable service actions are announced to this channel
// so operators can see who did what.
#[derive(Debug, Deserialize, Clone)]
pub struct Log {
pub channel: String,
}
// One services operator: an account and the privileges it holds.