Make opers with no known privset pass IsOperGeneral
This commit is contained in:
parent
734e774713
commit
64c9f5093f
1 changed files with 2 additions and 1 deletions
|
@ -147,6 +147,7 @@ extern void cluster_generic(struct Client *, const char *, int cltype,
|
||||||
#define IsOperConfNeedSSL(x) ((x)->flags & OPER_NEEDSSL)
|
#define IsOperConfNeedSSL(x) ((x)->flags & OPER_NEEDSSL)
|
||||||
|
|
||||||
#define HasPrivilege(x, y) ((x)->user != NULL && (x)->user->privset != NULL && privilegeset_in_set((x)->user->privset, (y)))
|
#define HasPrivilege(x, y) ((x)->user != NULL && (x)->user->privset != NULL && privilegeset_in_set((x)->user->privset, (y)))
|
||||||
|
#define MayHavePrivilege(x, y) (HasPrivilege((x), (y)) || (IsOper((x)) && (x)->user != NULL && (x)->user->privset == NULL))
|
||||||
|
|
||||||
#define IsOperGlobalKill(x) (HasPrivilege((x), "oper:global_kill"))
|
#define IsOperGlobalKill(x) (HasPrivilege((x), "oper:global_kill"))
|
||||||
#define IsOperLocalKill(x) (HasPrivilege((x), "oper:local_kill"))
|
#define IsOperLocalKill(x) (HasPrivilege((x), "oper:local_kill"))
|
||||||
|
@ -165,7 +166,7 @@ extern void cluster_generic(struct Client *, const char *, int cltype,
|
||||||
#define IsOperInvis(x) (HasPrivilege((x), "oper:hidden"))
|
#define IsOperInvis(x) (HasPrivilege((x), "oper:hidden"))
|
||||||
#define IsOperRemoteBan(x) (HasPrivilege((x), "oper:remoteban"))
|
#define IsOperRemoteBan(x) (HasPrivilege((x), "oper:remoteban"))
|
||||||
#define IsOperMassNotice(x) (HasPrivilege((x), "oper:mass_notice"))
|
#define IsOperMassNotice(x) (HasPrivilege((x), "oper:mass_notice"))
|
||||||
#define IsOperGeneral(x) (HasPrivilege((x), "oper:general"))
|
#define IsOperGeneral(x) (MayHavePrivilege((x), "oper:general"))
|
||||||
|
|
||||||
#define SeesOper(target, source) (IsOper((target)) && ((!ConfigFileEntry.hide_opers && !HasPrivilege((target), "oper:hidden")) || HasPrivilege((source), "auspex:oper")))
|
#define SeesOper(target, source) (IsOper((target)) && ((!ConfigFileEntry.hide_opers && !HasPrivilege((target), "oper:hidden")) || HasPrivilege((source), "auspex:oper")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue