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:
Jean Chevronnet 2026-07-13 03:06:58 +00:00
parent 75019c867a
commit 3bf6b2be77
No known key found for this signature in database
7 changed files with 62 additions and 2 deletions

View file

@ -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}"));
}