add +k servprotect umode (server-set-only, advertised in 004/umodes): blocks KILL, KICK and SA* on a network service; tracked for remote services too

This commit is contained in:
Jean Chevronnet 2026-08-16 03:00:25 +00:00
parent 91022cffe8
commit b7600ee5aa
5 changed files with 69 additions and 1 deletions

View file

@ -506,6 +506,15 @@ impl Command for Kick {
);
return CmdResult::Fail;
}
// servprotect (+k): a network service can't be kicked
if s.uid_servprotected(tuid) {
s.numeric(
uid,
ERR_CHANOPRIVSNEEDED,
&format!("{chan} :You cannot kick a network service"),
);
return CmdResult::Fail;
}
// can't kick someone who out-ranks you
if s.rank(uid, &key) < s.rank(tuid, &key) {
s.numeric(