]> jfr.im git - solanum.git/blobdiff - include/s_newconf.h
Resolve shfit/reduce conflict in timespec production (#54)
[solanum.git] / include / s_newconf.h
index 41e7444230fdd53c3b41d2e83ac315fd0ed2d757..118fc50422e304d9a67bd414b31903c23bf74f0c 100644 (file)
@@ -43,7 +43,6 @@
 struct ConfItem;
 
 extern rb_dlink_list cluster_conf_list;
-extern rb_dlink_list shared_conf_list;
 extern rb_dlink_list oper_conf_list;
 extern rb_dlink_list hubleaf_conf_list;
 extern rb_dlink_list server_conf_list;
@@ -131,8 +130,6 @@ struct oper_conf
 extern struct remote_conf *make_remote_conf(void);
 extern void free_remote_conf(struct remote_conf *);
 
-extern bool find_shared_conf(const char *username, const char *host,
-                       const char *server, int flags);
 extern void propagate_generic(struct Client *source_p, const char *command,
                const char *target, int cap, const char *format, ...);
 extern void cluster_generic(struct Client *, const char *, int cltype,
@@ -146,10 +143,10 @@ 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 MayHavePrivilege(x, y) (HasPrivilege((x), (y)) || (IsOper((x)) && (x)->user != NULL && (x)->user->privset == NULL))
 
-#define IsOperGlobalKill(x)     (HasPrivilege((x), "oper:global_kill"))
-#define IsOperLocalKill(x)      (HasPrivilege((x), "oper:local_kill"))
+#define IsOperKill(x)           (HasPrivilege((x), "oper:kill"))
 #define IsOperRemote(x)         (HasPrivilege((x), "oper:routing"))
 #define IsOperUnkline(x)        (HasPrivilege((x), "oper:unkline"))
 #define IsOperN(x)              (HasPrivilege((x), "snomask:nick_changes"))
@@ -163,10 +160,11 @@ extern void cluster_generic(struct Client *, const char *, int cltype,
 #define IsOperOperwall(x)       (HasPrivilege((x), "oper:operwall"))
 #define IsOperSpy(x)            (HasPrivilege((x), "oper:spy"))
 #define IsOperInvis(x)          (HasPrivilege((x), "oper:hidden"))
-#define IsOperRemoteBan(x)     (HasPrivilege((x), "oper:remoteban"))
-#define IsOperMassNotice(x)    (HasPrivilege((x), "oper:mass_notice"))
+#define IsOperRemoteBan(x)      (HasPrivilege((x), "oper:remoteban"))
+#define IsOperMassNotice(x)     (HasPrivilege((x), "oper:mass_notice"))
+#define IsOperGeneral(x)        (MayHavePrivilege((x), "oper:general"))
 
-#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")) || HasPrivilege((source), "auspex:oper")))
 
 extern struct oper_conf *make_oper_conf(void);
 extern void free_oper_conf(struct oper_conf *);