X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/8d88296547880e2eb6a89764cef4b0505705c114..0b401fb654b69fd9649954a9bdd5ff041971e62d:/src/hash.h?ds=sidebyside diff --git a/src/hash.h b/src/hash.h index 513638a..2e81f25 100644 --- a/src/hash.h +++ b/src/hash.h @@ -24,6 +24,7 @@ #include "common.h" #include "dict.h" #include "policer.h" +#include "recdb.h" #define MODE_CHANOP 0x00000001 /* +o USER */ #define MODE_VOICE 0x00000002 /* +v USER */ @@ -186,6 +187,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 */ }; @@ -246,6 +252,8 @@ struct userNode { char *version_reply; /* only filled in if a version query was triggered */ char *sslfp; /* only filled in if a mark SSLCLIFP is received */ + struct string_list *marks; /* list of user's marks */ + time_t timestamp; /* Time of last nick change */ time_t idle_since; struct server *uplink; /* Server that user is connected to */ @@ -384,6 +392,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); @@ -395,6 +405,11 @@ typedef int (*server_link_func_t) (struct server *server, void *extra); void reg_server_link_func(server_link_func_t handler, void *extra); void call_server_link_funcs(struct server *server); +typedef void (*sasl_input_func_t) (struct server* source ,const char *identifier, const char *subcmd, const char *data, const char *ext, void *extra); +void reg_sasl_input_func(sasl_input_func_t handler, void *extra); +void call_sasl_input_func(struct server* source ,const char *identifier, const char *subcmd, const char *data, const char *ext); +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 call_new_user_funcs(struct userNode *user);