OperServ: IGNORE — silence a user across all services

IGNORE ADD [+expiry] <mask> [reason] / DEL <mask> / LIST. While a user
matches, the dispatch choke-point drops their service commands silently.
A mask with an @ matches nick!*@host (ident isn't tracked); a bare mask
matches the nick; matching is case-insensitive with lazy expiry. Admin-
only, and an operator is never ignored (so staff can't lock themselves
out). Node-local and in-memory, like the auth and request throttles — a
fast transient moderation tool, not persisted or federated.
This commit is contained in:
Jean Chevronnet 2026-07-14 01:00:05 +00:00
parent c5d93f29c1
commit ab5dc2e931
No known key found for this signature in database
5 changed files with 217 additions and 3 deletions

View file

@ -449,6 +449,14 @@ pub struct AkillView {
pub expires: Option<u64>,
}
// A services ignore held by OperServ.
#[derive(Debug, Clone)]
pub struct IgnoreView {
pub mask: String,
pub reason: String,
pub expires: Option<u64>,
}
#[derive(Debug, Clone)]
pub struct BotView {
pub nick: String,
@ -701,6 +709,10 @@ pub trait Store {
fn akill_add(&mut self, kind: &str, mask: &str, setter: &str, reason: &str, expires: Option<u64>) -> Result<bool, RegError>;
fn akill_del(&mut self, kind: &str, mask: &str) -> Result<bool, RegError>;
fn akills(&self) -> Vec<AkillView>;
// Services ignores (node-local, oper-only).
fn ignore_add(&mut self, mask: &str, reason: &str, expires: Option<u64>);
fn ignore_del(&mut self, mask: &str) -> bool;
fn ignores(&self) -> Vec<IgnoreView>;
fn register_channel(&mut self, name: &str, founder: &str) -> Result<(), ChanError>;
fn drop_channel(&mut self, name: &str) -> Result<(), ChanError>;
fn set_mlock(&mut self, name: &str, on: &str, off: &str) -> Result<(), ChanError>;