From 1ef5b4305333fd43b79cea2d294b5a51058cbf2b Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 18 Dec 2007 00:24:05 +0100 Subject: [PATCH] Require resv oper privilege to set cmode +L or +P. --- doc/example.conf | 2 +- doc/reference.conf | 2 +- src/chmode.c | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/example.conf b/doc/example.conf index 66c0745..5282b17 100755 --- a/doc/example.conf +++ b/doc/example.conf @@ -226,7 +226,7 @@ operator "god" { * will not have the admin lines in * stats p and whois. * xline: allows use of /quote xline/unxline - * resv: allows use of /quote resv/unresv [DEFAULT] + * resv: allows /quote resv/unresv and cmode +LP [DEFAULT] * operwall: allows the oper to send/receive operwalls [DEFAULT] * oper_spy: allows 'operspy' features to see through +s * channels etc. see /quote help operspy diff --git a/doc/reference.conf b/doc/reference.conf index 08571b5..7b35978 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -392,7 +392,7 @@ operator "god" { * will not have the admin lines in * stats p and whois. * xline: allows use of /quote xline/unxline - * resv: allows use of /quote resv/unresv [DEFAULT] + * resv: allows /quote resv/unresv and cmode +LP [DEFAULT] * operwall: allows the oper to send/receive operwalls [DEFAULT] * oper_spy: allows 'operspy' features to see through +s * channels etc. see /quote help operspy diff --git a/src/chmode.c b/src/chmode.c index 3f42a6f..a45daa7 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -449,6 +449,14 @@ chm_staff(struct Client *source_p, struct Channel *chptr, *errors |= SM_ERR_NOPRIVS; return; } + if(MyClient(source_p) && !IsOperResv(source_p)) + { + if(!(*errors & SM_ERR_NOPRIVS)) + sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, + source_p->name, "resv"); + *errors |= SM_ERR_NOPRIVS; + return; + } /* setting + */ if((dir == MODE_ADD) && !(chptr->mode.mode & mode_type))