extb_oper: allow matching $o:<privset> as well as $o:<permission> as in 3.4
This commit is contained in:
parent
2daf18131c
commit
947d2bba47
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue