From 1612ed74113a8a40d8a8847949ddcafc11cceceb Mon Sep 17 00:00:00 2001 From: griever Date: Sun, 2 Dec 2001 20:45:17 +0000 Subject: [PATCH] added can_gkline and can_gzline (for soon-to-come gzline module), old flags are t and Z. Someone change docs accordingly --- include/struct.h | 6 ++++-- src/s_conf.c | 4 ++++ src/s_kline.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/struct.h b/include/struct.h index f093a67ab..54c849e0e 100644 --- a/include/struct.h +++ b/include/struct.h @@ -479,8 +479,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #define OFLAG_SADMIN 0x01000000 /* services admin gets +a */ #define OFLAG_WHOIS 0x02000000 /* gets auto +W on oper up */ #define OFLAG_HIDE 0x04000000 /* gets auto +x on oper up */ -#define OFLAG_AFOUNDER 0x10000000 -#define OFLAG_COFOUND 0x20000000 +#define OFLAG_TKL 0x10000000 /* can use G:lines and shuns */ +#define OFLAG_GZL 0x20000000 /* can use global Z:lines */ #define OFLAG_WMASTER 0x40000000 #define OFLAG_INVISIBLE 0x80000000 #define OFLAG_LOCAL (OFLAG_REHASH|OFLAG_HELPOP|OFLAG_GLOBOP|OFLAG_WALLOP|OFLAG_LOCOP|OFLAG_LROUTE|OFLAG_LKILL|OFLAG_KLINE|OFLAG_UNKLINE|OFLAG_LNOTICE|OFLAG_UMODEC|OFLAG_UMODEF) @@ -488,6 +488,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #define OFLAG_ISGLOBAL (OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE) +#define OPCanTKL(x) ((x)->user->oflag & OFLAG_TKL) +#define OPCanGZL(x) ((x)->user->oflag & OFLAG_GZL) #define OPCanZline(x) ((x)->user->oflag & OFLAG_ZLINE) #define OPCanRehash(x) ((x)->user->oflag & OFLAG_REHASH) #define OPCanDie(x) ((x)->user->oflag & OFLAG_DIE) diff --git a/src/s_conf.c b/src/s_conf.c index f6870fee1..8761a9760 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -164,6 +164,8 @@ static int _OldOperFlags[] = { OFLAG_WHOIS, 'W', OFLAG_HIDE, 'H', OFLAG_INVISIBLE, '^', + OFLAG_TKL, 't', + OFLAG_GZL, 'Z', 0, 0 }; @@ -197,6 +199,8 @@ static OperFlag _OperFlags[] = { { OFLAG_WHOIS, "get_umodew"}, { OFLAG_INVISIBLE, "can_stealth"}, { OFLAG_HIDE, "get_host"}, + { OFLAG_TKL, "can_gkline"}, + { OFLAG_GZL, "can_gzline"}, { 0L, NULL } }; diff --git a/src/s_kline.c b/src/s_kline.c index 943988030..2693fb7c7 100644 --- a/src/s_kline.c +++ b/src/s_kline.c @@ -705,7 +705,7 @@ int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[]) { return; } - if (!IsOper(sptr)) + if (!IsOper(sptr) || !OPCanTKL(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name); @@ -895,7 +895,7 @@ int m_shun(aClient *cptr, aClient *sptr, int parc, char *parv[]) return 0; } - if (!IsOper(sptr)) + if (!IsOper(sptr) || !OPCanTKL(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name);