mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-30 23:46:38 +02:00
- Added can_dccdeny operflag so you can give your local/global opers access to this too.
Co-admin, admin, sadmin and netadmin get it by default. Suggested in #0001247. - Updated operflag docs.
This commit is contained in:
@@ -2804,3 +2804,6 @@ seen. gmtime warning still there
|
||||
an exception because this msg is sent to _all opers_ and you cannot disable it by
|
||||
unsetting certain snomasks. Anything lower than 15s would be bad anyway since this
|
||||
is a very serious error condition. Requested by LoVeR (#0001412).
|
||||
- Added can_dccdeny operflag so you can give your local/global opers access to this too.
|
||||
Co-admin, admin, sadmin and netadmin get it by default. Suggested in #0001247.
|
||||
- Updated operflag docs.
|
||||
|
||||
+20
-1
@@ -21,7 +21,7 @@
|
||||
<font size="4"><a href="http://www.unrealircd.com">http://www.unrealircd.com</a></font><br>
|
||||
<font size="4">Version: 3.2</font><br>
|
||||
<b>Current Version:</b> 3.2 Beta19-CVS<br>
|
||||
<b>Last doc update:</b> 2004-01-30</div>
|
||||
<b>Last doc update:</b> 2004-02-05</div>
|
||||
<b>Head Coders:</b> Stskeeps / codemastr / Syzop / Luke / McSkaf<br>
|
||||
<b>Contributors:</b> Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk<br>
|
||||
<b>Documentation:</b> CKnight^ / Syzop<br>
|
||||
@@ -894,6 +894,11 @@ listen *:6601 {
|
||||
<td><div align="center">can_setq</div></td>
|
||||
<td>Can use usermode +q</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div align="center">d</div></td>
|
||||
<td><div align="center">can_dccdeny</div></td>
|
||||
<td>Can use /dccdeny and /undccdeny</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>Certain flags give you other flags by default:</p>
|
||||
<table width="59%" border="1">
|
||||
@@ -995,6 +1000,20 @@ listen *:6601 {
|
||||
<td>global</td>
|
||||
<td>global</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>can_dccdeny</td>
|
||||
<td>can_dccdeny</td>
|
||||
<td>can_dccdeny</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>can_setq</td>
|
||||
<td>can_setq</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
+13
-11
@@ -501,22 +501,23 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
* defined operator access levels
|
||||
*/
|
||||
#define OFLAG_REHASH 0x00000001 /* Oper can /rehash server */
|
||||
#define OFLAG_DIE 0x00000002 /* Oper can /die the server */
|
||||
#define OFLAG_DIE 0x00000002 /* Oper can /die the server */
|
||||
#define OFLAG_RESTART 0x00000004 /* Oper can /restart the server */
|
||||
#define OFLAG_DCCDENY 0x00000008 /* Oper can use /dccdeny and /undccdeny */
|
||||
#define OFLAG_HELPOP 0x00000010 /* Oper can send /HelpOps */
|
||||
#define OFLAG_GLOBOP 0x00000020 /* Oper can send /GlobOps */
|
||||
#define OFLAG_WALLOP 0x00000040 /* Oper can send /WallOps */
|
||||
#define OFLAG_LOCOP 0x00000080 /* Oper can send /LocOps */
|
||||
#define OFLAG_LOCOP 0x00000080 /* Oper can send /LocOps */
|
||||
#define OFLAG_LROUTE 0x00000100 /* Oper can do local routing */
|
||||
#define OFLAG_GROUTE 0x00000200 /* Oper can do global routing */
|
||||
#define OFLAG_LKILL 0x00000400 /* Oper can do local kills */
|
||||
#define OFLAG_GKILL 0x00000800 /* Oper can do global kills */
|
||||
#define OFLAG_KLINE 0x00001000 /* Oper can /kline users */
|
||||
#define OFLAG_LKILL 0x00000400 /* Oper can do local kills */
|
||||
#define OFLAG_GKILL 0x00000800 /* Oper can do global kills */
|
||||
#define OFLAG_KLINE 0x00001000 /* Oper can /kline users */
|
||||
#define OFLAG_UNKLINE 0x00002000 /* Oper can /unkline users */
|
||||
#define OFLAG_LNOTICE 0x00004000 /* Oper can send local serv notices */
|
||||
#define OFLAG_GNOTICE 0x00008000 /* Oper can send global notices */
|
||||
#define OFLAG_ADMIN 0x00010000 /* Admin */
|
||||
#define OFLAG_ZLINE 0x00080000 /* Oper can use /zline and /unzline */
|
||||
#define OFLAG_ADMIN 0x00010000 /* Admin */
|
||||
#define OFLAG_ZLINE 0x00080000 /* Oper can use /zline and /unzline */
|
||||
#define OFLAG_NETADMIN 0x00200000 /* netadmin gets +N */
|
||||
#define OFLAG_COADMIN 0x00800000 /* co admin gets +C */
|
||||
#define OFLAG_SADMIN 0x01000000 /* services admin gets +a */
|
||||
@@ -529,13 +530,14 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define OFLAG_LOCAL (OFLAG_REHASH|OFLAG_HELPOP|OFLAG_GLOBOP|OFLAG_WALLOP|OFLAG_LOCOP|OFLAG_LROUTE|OFLAG_LKILL|OFLAG_KLINE|OFLAG_UNKLINE|OFLAG_LNOTICE)
|
||||
#define OFLAG_GLOBAL (OFLAG_LOCAL|OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
|
||||
#define OFLAG_ISGLOBAL (OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
|
||||
#define OFLAG_NADMIN (OFLAG_NETADMIN | OFLAG_SADMIN | OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ)
|
||||
#define OFLAG_ADMIN_ (OFLAG_ADMIN | OFLAG_GLOBAL)
|
||||
#define OFLAG_COADMIN_ (OFLAG_COADMIN | OFLAG_GLOBAL)
|
||||
#define OFLAG_SADMIN_ (OFLAG_SADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ)
|
||||
#define OFLAG_NADMIN (OFLAG_NETADMIN | OFLAG_SADMIN | OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ | OFLAG_DCCDENY)
|
||||
#define OFLAG_ADMIN_ (OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_DCCDENY)
|
||||
#define OFLAG_COADMIN_ (OFLAG_COADMIN | OFLAG_GLOBAL | OFLAG_DCCDENY)
|
||||
#define OFLAG_SADMIN_ (OFLAG_SADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ | OFLAG_DCCDENY)
|
||||
|
||||
#define OPCanOverride(x) ((x)->oflag & OFLAG_OVERRIDE)
|
||||
#define OPCanUmodeq(x) ((x)->oflag & OFLAG_UMODEQ)
|
||||
#define OPCanDCCDeny(x) ((x)->oflag & OFLAG_DCCDENY)
|
||||
#define OPCanTKL(x) ((x)->oflag & OFLAG_TKL)
|
||||
#define OPCanGZL(x) ((x)->oflag & OFLAG_GZL)
|
||||
#define OPCanZline(x) ((x)->oflag & OFLAG_ZLINE)
|
||||
|
||||
@@ -201,12 +201,14 @@ static int _OldOperFlags[] = {
|
||||
OFLAG_GZL, 'Z',
|
||||
OFLAG_OVERRIDE, 'v',
|
||||
OFLAG_UMODEQ, 'q',
|
||||
OFLAG_DCCDENY, 'd',
|
||||
0, 0
|
||||
};
|
||||
|
||||
/* This MUST be alphabetized */
|
||||
static OperFlag _OperFlags[] = {
|
||||
{ OFLAG_ADMIN_, "admin"},
|
||||
{ OFLAG_DCCDENY, "can_dccdeny"},
|
||||
{ OFLAG_DIE, "can_die" },
|
||||
{ OFLAG_TKL, "can_gkline"},
|
||||
{ OFLAG_GKILL, "can_globalkill" },
|
||||
|
||||
+2
-2
@@ -125,7 +125,7 @@ int m_dccdeny(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
if (!MyClient(sptr))
|
||||
return 0;
|
||||
|
||||
if (!IsAdmin(sptr))
|
||||
if (!IsAnOper(sptr) || !OPCanDCCDeny(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
@@ -167,7 +167,7 @@ int m_undccdeny(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
if (!MyClient(sptr))
|
||||
return 0;
|
||||
|
||||
if (!IsAdmin(sptr))
|
||||
if (!IsAnOper(sptr) || !OPCanDCCDeny(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user