OperServ: add FORBID (nick/channel/email registration bans)
All checks were successful
CI / check (push) Successful in 3m56s
All checks were successful
CI / check (push) Successful in 3m56s
FORBID ADD/DEL/LIST bans a NICK, CHAN, or EMAIL glob from being registered — a network-wide policy that gossips like an AKILL and every node enforces. Nick registration is blocked in pre_register_check (both NickServ REGISTER and the account-registration relay), and channel registration in ChanServ REGISTER. New Forbid store + events, mirroring the akill subsystem.
This commit is contained in:
parent
ac50af92fc
commit
be4860c9a8
12 changed files with 220 additions and 1 deletions
|
|
@ -625,6 +625,16 @@ pub struct AkillView {
|
|||
pub expires: Option<u64>,
|
||||
}
|
||||
|
||||
// A registration ban held by OperServ FORBID (kind = NICK/CHAN/EMAIL).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ForbidView {
|
||||
pub kind: String,
|
||||
pub mask: String,
|
||||
pub setter: String,
|
||||
pub reason: String,
|
||||
pub ts: u64,
|
||||
}
|
||||
|
||||
// A services ignore held by OperServ.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct IgnoreView {
|
||||
|
|
@ -917,6 +927,11 @@ 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>;
|
||||
// Registration bans (OperServ FORBID).
|
||||
fn forbid_add(&mut self, kind: &str, mask: &str, setter: &str, reason: &str) -> Result<bool, RegError>;
|
||||
fn forbid_del(&mut self, kind: &str, mask: &str) -> Result<bool, RegError>;
|
||||
fn forbids(&self) -> Vec<ForbidView>;
|
||||
fn is_forbidden(&self, kind: &str, name: &str) -> Option<String>;
|
||||
// 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue