1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 09:43:12 +02:00

Add initial permission syste hooks for whois - more later

This commit is contained in:
Travis McArthur
2015-06-01 22:53:42 -04:00
parent 6cb5cbfc06
commit c1a402c85e
+6 -6
View File
@@ -195,11 +195,11 @@ DLLFUNC int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
showchannel = 0;
if (ShowChannel(sptr, chptr))
showchannel = 1;
if (OPCanSeeSecret(sptr))
if (OPCanSeeSecret(sptr) || OperClass_evaluateACLPath(sptr->user->operlogin,"override:whois",sptr,NULL,chptr,NULL))
showchannel = 1;
if ((acptr->umodes & UMODE_HIDEWHOIS) && !IsMember(sptr, chptr) && !IsAnOper(sptr))
if ((acptr->umodes & UMODE_HIDEWHOIS) && !IsMember(sptr, chptr) && !IsAnOper(sptr) && !OperClass_evaluateACLPath(sptr->user->operlogin,"override:whois:",sptr,NULL,chptr,NULL))
showchannel = 0;
if (IsServices(acptr) && !IsNetAdmin(sptr) && !IsSAdmin(sptr))
if (IsServices(acptr) && !IsNetAdmin(sptr) && !IsSAdmin(sptr) && !OperClass_evaluateACLPath(sptr->user->operlogin,"override:whois",sptr,NULL,chptr,NULL))
showchannel = 0;
if (acptr == sptr)
showchannel = 1;
@@ -218,11 +218,11 @@ DLLFUNC int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
len = 0;
}
#ifdef SHOW_SECRET
if (IsAnOper(sptr)
if ((IsAnOper(sptr) ||
#else
if (IsNetAdmin(sptr)
if ((IsNetAdmin(sptr) ||
#endif
&& SecretChannel(chptr) && !IsMember(sptr, chptr))
OperClass_evaluateACLPath(sptr->user->operlogin,"override:whois",sptr,NULL,chptr,NULL)) && SecretChannel(chptr) && !IsMember(sptr, chptr))
*(buf + len++) = '?';
if (acptr->umodes & UMODE_HIDEWHOIS && !IsMember(sptr, chptr)
&& IsAnOper(sptr))