ChanServ: add SET AUTOOP
All checks were successful
CI / check (push) Successful in 3m35s

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:
Jean Chevronnet 2026-07-16 00:36:19 +00:00
parent 2c282d036f
commit 2850620be1
No known key found for this signature in database
7 changed files with 46 additions and 3 deletions

View file

@ -826,13 +826,17 @@ impl Engine {
return out;
}
}
// AUTOOP (on by default): whether access members are auto-opped here.
let autoop = self.db.channel(&channel).is_none_or(|c| !c.settings.noautoop);
match mode {
// A user with access gets their status mode, plus the entry message.
Some(m) => {
if let Some(msg) = entrymsg {
out.push(NetAction::Notice { from: from.clone(), to: uid.clone(), text: msg });
}
out.push(NetAction::ChannelMode { from, channel, modes: format!("{m} {uid}") });
if autoop {
out.push(NetAction::ChannelMode { from, channel, modes: format!("{m} {uid}") });
}
}
// No access: an auto-kick match is banned and kicked, else greeted.
None => {