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
|
|
@ -15,6 +15,9 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, net:
|
|||
ctx.notice(me, from.uid, format!("\x02{nick}\x02 isn't here."));
|
||||
return;
|
||||
};
|
||||
if super::peace_blocks(me, from, chan, target, ctx, net, db) {
|
||||
return;
|
||||
}
|
||||
let mut reason = if args.len() > 3 { args[3..].join(" ") } else { "Kicked".to_string() };
|
||||
// SIGNKICK: attribute the kick to whoever asked for it.
|
||||
if db.channel(chan).is_some_and(|c| c.signkick) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue