]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/hash.h
Added new event hooks system and started migrating events to new system
[irc/evilnet/x3.git] / src / hash.h
index 9f1f5e47bda097077ec441c24cccf29dfcac1bb3..3c36823367b9f7c7338dc3f59a7421bfe233dd0c 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "common.h"
 #include "dict.h"
+#include "eventhooks.h"
 #include "policer.h"
 #include "recdb.h"
 
@@ -187,6 +188,11 @@ enum Priv {
   PRIV_REMOVE,          /**< oper can force remove deactivated glines,
                              shuns and zlines. */
   PRIV_SPAMFILTER,      /**< oper can set spamfilters via SPAMFILTER */
+  PRIV_ADMIN,           /**< oper is an IRC Admin */
+  PRIV_APASS_OPMODE,    /**< oper can use OPMODE to set/unset channel modes +A and +U */
+  PRIV_HIDE_OPER,       /**< oper can set/unset user mode +H */
+  PRIV_REMOTE,          /**< oper can use his/her operator block from a remote server */
+  PRIV_SERVICE,         /**< oper can set/unset user mode +k */
   PRIV_LAST_PRIV        /**< number of privileges */
 };
 
@@ -378,6 +384,11 @@ struct route {
     struct routeList *servers;
 };
 
+/* generic hook function args */
+struct funcargs {
+    void *func;
+    void *extra;
+};
 
 extern struct server *self;
 extern dict_t channels;
@@ -387,6 +398,8 @@ extern unsigned int max_clients, invis_clients;
 extern time_t max_clients_time;
 extern struct userList curr_opers, curr_helpers;
 
+extern unsigned int count_opers;
+
 struct server* GetServerH(const char *name); /* using full name */
 struct userNode* GetUserH(const char *nick);   /* using nick */
 struct chanNode* GetChannel(const char *name);
@@ -405,6 +418,7 @@ void unreg_sasl_input_func(sasl_input_func_t handler, void *extra);
 
 typedef int (*new_user_func_t) (struct userNode *user, void *extra);
 void reg_new_user_func(new_user_func_t handler, void *extra);
+void reg_new_user_func_pos(new_user_func_t handler, void *extra, int pos);
 void call_new_user_funcs(struct userNode *user);
 typedef void (*del_user_func_t) (struct userNode *user, struct userNode *killer, const char *why, void *extra);
 void reg_del_user_func(del_user_func_t handler, void *extra);
@@ -426,6 +440,7 @@ void set_geoip_info(struct userNode *user);
 typedef void (*new_channel_func_t) (struct chanNode *chan, void *extra);
 void reg_new_channel_func(new_channel_func_t handler, void *extra);
 typedef int (*join_func_t) (struct modeNode *mNode, void *extra);
+void reg_join_func_pos(join_func_t handler, void *extra, int pos);
 void reg_join_func(join_func_t handler, void *extra);
 typedef void (*del_channel_func_t) (struct chanNode *chan, void *extra);
 void reg_del_channel_func(del_channel_func_t handler, void *extra);