NickServ: add SET KILL to toggle nick protection

Nick protection was unconditional. SET KILL OFF lets an account opt out —
an unidentified user keeping one of its nicks is no longer prompted or
renamed to a guest. Stored inverted (no_protect) so protection stays the
default. Accepts Anope's ON/QUICK/IMMED/OFF; grace is a fixed interval
here, so the finer variants simply enable protection like ON.
This commit is contained in:
Jean Chevronnet 2026-07-16 01:43:10 +00:00
parent 87e21ff85f
commit 2c4bc9079c
No known key found for this signature in database
11 changed files with 106 additions and 9 deletions

View file

@ -917,6 +917,9 @@ pub trait Store {
// NickServ SET AUTOOP: whether this account is auto-opped on join.
fn set_account_autoop(&mut self, account: &str, on: bool) -> Result<(), RegError>;
fn account_wants_autoop(&self, account: &str) -> bool;
// NickServ SET KILL: whether this account's nicks are enforcer-protected.
fn set_account_kill(&mut self, account: &str, on: bool) -> Result<(), RegError>;
fn account_wants_protect(&self, account: &str) -> bool;
// HostServ vhosts.
fn set_vhost(&mut self, account: &str, host: &str, setter: &str, ttl: Option<u64>) -> Result<(), RegError>;
fn del_vhost(&mut self, account: &str) -> Result<bool, RegError>;