BotServ: COPY <#src> <#dst> to clone bot config
Copies a channel's kickers, badword list, greet and nobot settings onto another channel (founder-or-admin on both). Cheap because the config is a typed KickerSettings + Vec<String>, not a bag of stringly extensibles.
This commit is contained in:
parent
0edc4d4e87
commit
c8be5b4e95
5 changed files with 83 additions and 0 deletions
|
|
@ -574,6 +574,8 @@ pub trait Store {
|
|||
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>;
|
||||
// Copy one channel's BotServ config (kickers/badwords/greet/nobot) to another.
|
||||
fn copy_bot_config(&mut self, src: &str, dst: &str) -> Result<(), ChanError>;
|
||||
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