0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-01 01:28:54 +02:00

extb_oper: allow matching $o:<privset> as well as $o:<permission> as in 3.4

This commit is contained in:
William Pitcock 2016-01-05 19:12:38 -06:00
parent 2daf18131c
commit 947d2bba47

View file

@ -40,8 +40,14 @@ static int eb_oper(const char *data, struct Client *client_p,
(void)mode_type;
if (data != NULL)
{
struct PrivilegeSet *set = privilegeset_get(data);
if (set != NULL && client_p->localClient->privset == set)
return EXTBAN_MATCH;
/* $o:admin or whatever */
return HasPrivilege(client_p, data) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}
return IsOper(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}