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
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue