X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/6003ce763cd7a7116c975174ff25805e26d4cd4c..3ef1213be4da2d49c21f544cd6a3277b10b26399:/include/s_newconf.h diff --git a/include/s_newconf.h b/include/s_newconf.h index 4792b005..4decc5a3 100644 --- a/include/s_newconf.h +++ b/include/s_newconf.h @@ -146,7 +146,7 @@ extern void cluster_generic(struct Client *, const char *, int cltype, #define IsOperConfEncrypted(x) ((x)->flags & OPER_ENCRYPTED) #define IsOperConfNeedSSL(x) ((x)->flags & OPER_NEEDSSL) -#define HasPrivilege(x, y) ((x)->localClient != NULL && (x)->localClient->privset != NULL && privilegeset_in_set((x)->localClient->privset, (y))) +#define HasPrivilege(x, y) ((x)->user != NULL && (x)->user->privset != NULL && privilegeset_in_set((x)->user->privset, (y))) #define IsOperGlobalKill(x) (HasPrivilege((x), "oper:global_kill")) #define IsOperLocalKill(x) (HasPrivilege((x), "oper:local_kill")) @@ -166,6 +166,8 @@ extern void cluster_generic(struct Client *, const char *, int cltype, #define IsOperRemoteBan(x) (HasPrivilege((x), "oper:remoteban")) #define IsOperMassNotice(x) (HasPrivilege((x), "oper:mass_notice")) +#define SeesOper(target, source) (IsOper((target)) && ((!ConfigFileEntry.hide_opers && !HasPrivilege((target), "oper:hidden")) || IsOper((source)))) + extern struct oper_conf *make_oper_conf(void); extern void free_oper_conf(struct oper_conf *); extern void clear_oper_conf(void);