Add resv oper priv, enabled by default for compatibility.
This commit is contained in:
parent
33b310b376
commit
1ebe6ffc92
|
@ -226,6 +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]
|
||||
* operwall: allows the oper to send/receive operwalls [DEFAULT]
|
||||
* oper_spy: allows 'operspy' features to see through +s
|
||||
* channels etc. see /quote help operspy
|
||||
|
|
|
@ -392,6 +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]
|
||||
* operwall: allows the oper to send/receive operwalls [DEFAULT]
|
||||
* oper_spy: allows 'operspy' features to see through +s
|
||||
* channels etc. see /quote help operspy
|
||||
|
|
|
@ -171,6 +171,7 @@ extern void cluster_generic(struct Client *, const char *, int cltype,
|
|||
#define IsOperN(x) ((x)->flags2 & OPER_NICKS)
|
||||
#define IsOperK(x) ((x)->flags2 & OPER_KLINE)
|
||||
#define IsOperXline(x) ((x)->flags2 & OPER_XLINE)
|
||||
#define IsOperResv(x) ((x)->flags2 & OPER_RESV)
|
||||
#define IsOperDie(x) ((x)->flags2 & OPER_DIE)
|
||||
#define IsOperRehash(x) ((x)->flags2 & OPER_REHASH)
|
||||
#define IsOperHiddenAdmin(x) ((x)->flags2 & OPER_HADMIN)
|
||||
|
|
|
@ -84,6 +84,13 @@ mo_resv(struct Client *client_p, struct Client *source_p, int parc, const char *
|
|||
int temp_time;
|
||||
int loc = 1;
|
||||
|
||||
if(!IsOperResv(source_p))
|
||||
{
|
||||
sendto_one(source_p, form_str(ERR_NOPRIVS),
|
||||
me.name, source_p->name, "resv");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* RESV [time] <name> [ON <server>] :<reason> */
|
||||
|
||||
if((temp_time = valid_temp_time(parv[loc])) >= 0)
|
||||
|
@ -370,6 +377,13 @@ cluster_resv(struct Client *source_p, int temp_time, const char *name,
|
|||
static int
|
||||
mo_unresv(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
|
||||
{
|
||||
if(!IsOperResv(source_p))
|
||||
{
|
||||
sendto_one(source_p, form_str(ERR_NOPRIVS),
|
||||
me.name, source_p->name, "resv");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((parc == 4) && (irccmp(parv[2], "ON") == 0))
|
||||
{
|
||||
if(!IsOperRemoteBan(source_p))
|
||||
|
|
|
@ -321,6 +321,7 @@ static struct mode_table flag_table[] = {
|
|||
{"admin", OPER_ADMIN },
|
||||
{"hidden_admin", OPER_HADMIN },
|
||||
{"xline", OPER_XLINE },
|
||||
{"resv", OPER_RESV },
|
||||
{"operwall", OPER_OPERWALL },
|
||||
{"oper_spy", OPER_SPY },
|
||||
{"hidden_oper", OPER_INVIS },
|
||||
|
@ -465,7 +466,7 @@ conf_begin_oper(struct TopConf *tc)
|
|||
}
|
||||
|
||||
yy_oper = make_oper_conf();
|
||||
yy_oper->flags |= OPER_ENCRYPTED|OPER_OPERWALL|OPER_REMOTEBAN;
|
||||
yy_oper->flags |= OPER_ENCRYPTED|OPER_RESV|OPER_OPERWALL|OPER_REMOTEBAN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -331,6 +331,7 @@ static struct oper_flags oper_flagtable[] =
|
|||
{ OPER_GLINE, 'G', 'g' },
|
||||
{ OPER_KLINE, 'K', 'k' },
|
||||
{ OPER_XLINE, 'X', 'x' },
|
||||
{ OPER_RESV, 'Q', 'q' },
|
||||
{ OPER_GLOBKILL, 'O', 'o' },
|
||||
{ OPER_LOCKILL, 'C', 'c' },
|
||||
{ OPER_REMOTE, 'R', 'r' },
|
||||
|
|
Loading…
Reference in New Issue