1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 10:06:37 +02:00

Remove more IsAnOp/IsOp

This commit is contained in:
Travis McArthur
2015-06-27 14:06:24 -07:00
parent 5943dd8c09
commit dc2b09a334
5 changed files with 15 additions and 16 deletions
+11 -6
View File
@@ -19,12 +19,13 @@
/* Local IRC Operator */
operclass locop {
privileges {
privacy;
chat;
channel;
client;
immune;
notice { local; };
server { rehash; };
server { dns; rehash; };
route { local; };
kill { local; };
tkl {
@@ -38,12 +39,13 @@ operclass locop {
/* Global IRC Operator */
operclass globop {
privileges {
privacy;
chat;
channel;
client;
immune;
notice;
server { rehash; };
server { dns; rehash; };
route;
kill;
tkl { shun; zline; kline; gline; };
@@ -57,12 +59,13 @@ operclass globop {
/* Server administrator */
operclass admin {
privileges {
privacy;
chat;
channel;
client;
immune;
notice;
server { addline; rehash; description; addmotd; addomotd; tsctl; };
server { dns; addline; rehash; description; addmotd; addomotd; tsctl; };
route;
kill;
tkl { shun; zline; kline; gline; };
@@ -76,12 +79,13 @@ operclass admin {
/* Services Admin */
operclass services-admin {
privileges {
privacy;
chat;
channel;
client;
immune;
notice;
server { addline; rehash; description; addmotd; addomotd; tsctl; };
server { dns; addline; rehash; description; addmotd; addomotd; tsctl; };
route;
kill;
tkl { shun; zline; kline; gline; };
@@ -98,12 +102,13 @@ operclass services-admin {
/* Network Administrator */
operclass netadmin {
privileges {
privacy;
chat;
channel;
client;
immune;
notice;
server { addline; rehash; description; addmotd; addomotd; tsctl; };
server { dns; addline; rehash; description; addmotd; addomotd; tsctl; };
kill;
tkl { shun; zline; kline; gline; };
route;
@@ -137,7 +142,7 @@ operclass admin-with-override {
/* Same as 'services-admin' operclass, but with OperOverride capabilities added */
operclass services-admin-with-override {
parent services-admin;
privileges {
privileges {
override;
};
};
+1 -3
View File
@@ -104,8 +104,6 @@ char cmodestring[512];
inline int op_can_override(char* acl, aClient *sptr,aChannel *channel,void* extra)
{
#ifndef NO_OPEROVERRIDE
if (!IsOper(sptr))
return 0;
if (MyClient(sptr) && !(OperClass_evaluateACLPath(acl,sptr,NULL,channel,extra)))
return 0;
return 1;
@@ -955,7 +953,7 @@ char *clean_ban_mask(char *mask, int what, aClient *cptr)
/* Extended ban? */
if ((*mask == '~') && mask[1] && (mask[2] == ':'))
{
if (RESTRICT_EXTENDEDBANS && MyClient(cptr) && !IsAnOper(cptr))
if (RESTRICT_EXTENDEDBANS && MyClient(cptr) && !OperClass_evaluateACLPath("channel:extbans",icptr,NULL,NULL,NULL))
{
if (!strcmp(RESTRICT_EXTENDEDBANS, "*"))
{
+1 -1
View File
@@ -485,7 +485,7 @@ int check_tkls(aClient *cptr)
if (bconf)
killflag++;
else if (!IsAnOper(cptr) && (bconf = Find_ban(NULL, cptr->info, CONF_BAN_REALNAME)))
else if (!OperClass_evaluateACLPath("immune",sptr,NULL,NULL,NULL) && (bconf = Find_ban(NULL, cptr->info, CONF_BAN_REALNAME)))
killflag++;
}
+1 -5
View File
@@ -167,11 +167,7 @@ inline void parse_addlag(aClient *cptr, int cmdbytes)
#ifdef FAKELAG_CONFIGURABLE
!(cptr->class && (cptr->class->options & CLASS_OPT_NOFAKELAG)) &&
#endif
#ifdef NO_FAKE_LAG_FOR_LOCOPS
!IsAnOper(cptr))
#else
!IsOper(cptr))
#endif
!OperClass_evaluateACLPath("privacy:fakelag",cptr,NULL,NULL,NULL))
{
cptr->since += (1 + cmdbytes/90);
}
+1 -1
View File
@@ -754,7 +754,7 @@ DNSCache *c;
DNSReq *r;
char *param;
if (!IsAnOper(sptr))
if (!OperClass_evaluateACLPath("server:dns",sptr,NULL,NULL,NULL))
{
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, sptr->name);
return 0;