chanserv: SET PEACE (block acting against equal-or-higher access)
PEACE stops a channel op from using ChanServ KICK/BAN/DEOP/DEVOICE against someone whose access rank (founder>op>voice) is equal to or above their own. Adds a typed access_rank on ChannelView and a peace_blocks guard in those commands. Same typed-settings path as SIGNKICK/PRIVATE; shown in INFO.
This commit is contained in:
parent
75019c867a
commit
3bf6b2be77
7 changed files with 62 additions and 2 deletions
|
|
@ -22,5 +22,9 @@ pub fn handle(me: &str, from: &Sender, mode: &str, args: &[&str], ctx: &mut Serv
|
|||
},
|
||||
None => from.uid.to_string(),
|
||||
};
|
||||
// PEACE only guards removing status (-o/-v) from an equal-or-higher user.
|
||||
if mode.starts_with('-') && super::peace_blocks(me, from, chan, &target, ctx, net, db) {
|
||||
return;
|
||||
}
|
||||
ctx.channel_mode(me, chan, &format!("{mode} {target}"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue