BotServ: KICK <#channel> TEST <message> dry-run
Reports which content kicker (caps/formatting/badwords) a line would trip, without kicking anyone — so an op can tune caps% or a badword regex safely. Reuses the typed KickerSettings::violation() and the shared badword-set builder (moved to db so the test and the live path share it).
This commit is contained in:
parent
9f5f0ed0d2
commit
0edc4d4e87
4 changed files with 60 additions and 12 deletions
|
|
@ -572,6 +572,8 @@ pub trait Store {
|
|||
fn badword_del(&mut self, channel: &str, pattern: &str) -> Result<bool, ChanError>;
|
||||
fn badword_clear(&mut self, channel: &str) -> Result<usize, ChanError>;
|
||||
fn badwords(&self, channel: &str) -> Vec<String>;
|
||||
// Dry-run the content kickers against a line; Some(reason) if it would kick.
|
||||
fn kicker_test(&self, channel: &str, text: &str) -> Option<String>;
|
||||
fn set_channel_topic(&mut self, channel: &str, topic: &str) -> Result<(), ChanError>;
|
||||
fn suspend_channel(&mut self, channel: &str, by: &str, reason: &str, expires: Option<u64>) -> Result<(), ChanError>;
|
||||
fn unsuspend_channel(&mut self, channel: &str) -> Result<bool, ChanError>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue