SET AUTOOP {ON|OFF} controls whether access members are auto-opped/voiced
on join (on by default). Stored inverted as a settings flag so the
default stays on, and gated in the join handler.
This commit is contained in:
parent
2c282d036f
commit
2850620be1
7 changed files with 46 additions and 3 deletions
|
|
@ -198,6 +198,7 @@ impl Db {
|
|||
ChanSetting::Peace => settings.peace = on,
|
||||
ChanSetting::SecureOps => settings.secureops = on,
|
||||
ChanSetting::Restricted => settings.restricted = on,
|
||||
ChanSetting::AutoOp => settings.noautoop = !on, // stored inverted (default on)
|
||||
ChanSetting::KeepTopic => settings.keeptopic = on,
|
||||
ChanSetting::TopicLock => settings.topiclock = on,
|
||||
ChanSetting::BotGreet => settings.bot_greet = on,
|
||||
|
|
|
|||
|
|
@ -355,6 +355,10 @@ pub struct ChanSettings {
|
|||
// Kick anyone without channel access when they join.
|
||||
#[serde(default)]
|
||||
pub restricted: bool,
|
||||
// Stored inverted so it defaults to auto-op ON: when set, access members are
|
||||
// NOT auto-opped on join (they must UP). SET AUTOOP toggles it.
|
||||
#[serde(default)]
|
||||
pub noautoop: bool,
|
||||
// Remember the topic and restore it when the channel is recreated.
|
||||
#[serde(default)]
|
||||
pub keeptopic: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue