]> jfr.im git - solanum.git/blobdiff - include/s_newconf.h
Merge pull request #335 from edk0/post-registration-delay
[solanum.git] / include / s_newconf.h
index 41e7444230fdd53c3b41d2e83ac315fd0ed2d757..4decc5a390cf54813f17ff86dc3c496acfd407c3 100644 (file)
@@ -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,7 +166,7 @@ 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))))
+#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 *);