operserv: NOTIFY honours a config exclude list so relay/pylinked clients cannot flood the feed

This commit is contained in:
Jean Chevronnet 2026-07-18 16:47:25 +00:00
parent c415117ec5
commit 8f19a94928
No known key found for this signature in database
8 changed files with 43 additions and 1 deletions

View file

@ -1004,6 +1004,9 @@ pub struct Db {
log: EventLog,
// Which extbans AKICK accepts (`[extban] enabled`). None = all echo knows.
extban_enabled: Option<std::collections::HashSet<String>>,
// Masks whose users are never matched by NOTIFY (`[log] notify_exclude`), so
// relay/pylinked clients don't flood the staff feed. Empty = exclude nobody.
notify_exclude: Vec<String>,
// The ircd's live extban set from its CAPAB EXTBANS burst. None until we link;
// once known, it's authoritative for what AKICK/MODE may set.
live_extbans: Option<Vec<echo_api::ExtbanCap>>,
@ -1110,7 +1113,7 @@ impl Db {
apply(&mut accounts, &mut channels, &mut grouped, &mut bots, &mut host_cfg, &mut net, event);
}
tracing::info!(accounts = accounts.len(), channels = channels.len(), "account store loaded");
Self { accounts, channels, grouped, log, extban_enabled: None, live_extbans: None, live_chanmodes: None, scram_iterations: scram::DEFAULT_ITERATIONS, email_enabled: false, email_brand: "Network Services".to_string(), email_accent: "#4f46e5".to_string(), email_logo: String::new(), codes: HashMap::new(), auth_fails: HashMap::new(), vhost_req_times: HashMap::new(), report_times: HashMap::new(), bots, host_cfg, net, ignores: Vec::new(), defcon: 5, external_accounts: false }
Self { accounts, channels, grouped, log, extban_enabled: None, notify_exclude: Vec::new(), live_extbans: None, live_chanmodes: None, scram_iterations: scram::DEFAULT_ITERATIONS, email_enabled: false, email_brand: "Network Services".to_string(), email_accent: "#4f46e5".to_string(), email_logo: String::new(), codes: HashMap::new(), auth_fails: HashMap::new(), vhost_req_times: HashMap::new(), report_times: HashMap::new(), bots, host_cfg, net, ignores: Vec::new(), defcon: 5, external_accounts: false }
}
/// Fold an entry authored by another node into the store — the services-side