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:
parent
91022cffe8
commit
b7600ee5aa
5 changed files with 69 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue