OperServ: SHUN and CHANKILL

- SHUN <user@host> silences a matching user network-wide without
  disconnecting them — another kind ("SHUN") in the generalized X-line
  handler (m_shun is loaded), same event-sourced list and lazy expiry as
  AKILL/SQLINE/SNLINE.
- CHANKILL <#channel> [reason] AKILLs every distinct member host in one
  shot to clear a spam or attack channel; the G-lines the ircd applies
  also kill the sessions. Deduped by host, and never bans the operator who
  ran it. Both admin-only.
This commit is contained in:
Jean Chevronnet 2026-07-14 02:00:17 +00:00
parent 1daebc94a5
commit 1f7591778f
No known key found for this signature in database
4 changed files with 93 additions and 1 deletions

View file

@ -123,6 +123,10 @@ pub const SQLINE: Xline = Xline { kind: "Q", name: "SQLINE", target: "nick", nor
// connecting user's realname (use `.` for spaces, e.g. `.*free.money.*`).
pub const SNLINE: Xline = Xline { kind: "R", name: "SNLINE", target: "realname-regex", normalize: norm_realname };
// SHUN: a user@host shun. A matching user stays connected but the ircd silently
// drops their commands — a quieter alternative to an AKILL.
pub const SHUN: Xline = Xline { kind: "SHUN", name: "SHUN", target: "user@host", normalize: norm_userhost };
fn norm_userhost(input: &str) -> Option<String> {
let body = input.rsplit('!').next().unwrap_or(input);
let (user, host) = body.split_once('@')?;