NickServ GETEMAIL + ChanServ SET RESTRICTED
All checks were successful
CI / check (push) Successful in 3m51s
All checks were successful
CI / check (push) Successful in 3m51s
GETEMAIL (auspex) lists accounts whose email matches a glob. SET RESTRICTED makes a channel kick anyone without access (or oper) as they join, mirroring the SECUREOPS on-join enforcement.
This commit is contained in:
parent
be4860c9a8
commit
53d3d63464
10 changed files with 107 additions and 2 deletions
|
|
@ -818,6 +818,14 @@ impl Engine {
|
|||
if op && mode != Some("+o") && self.db.channel(&channel).is_some_and(|c| c.settings.secureops) {
|
||||
out.push(NetAction::ChannelMode { from: from.clone(), channel: channel.clone(), modes: format!("-o {uid}") });
|
||||
}
|
||||
// RESTRICTED: only users with access (or opers) may be in the channel.
|
||||
if mode.is_none() && self.db.channel(&channel).is_some_and(|c| c.settings.restricted) {
|
||||
let is_oper = account.as_deref().is_some_and(|a| self.oper_privs(a).any());
|
||||
if !is_oper {
|
||||
out.push(NetAction::Kick { from, channel, uid, reason: "This channel is restricted to users with access.".to_string() });
|
||||
return out;
|
||||
}
|
||||
}
|
||||
match mode {
|
||||
// A user with access gets their status mode, plus the entry message.
|
||||
Some(m) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue