mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-10 17:23:13 +02:00
added can_gkline and can_gzline (for soon-to-come gzline module), old
flags are t and Z. Someone change docs accordingly
This commit is contained in:
+4
-2
@@ -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)
|
||||
|
||||
@@ -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 }
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user