]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/mod-helpserv.c
Couple of srvx updates.
[irc/evilnet/x3.git] / src / mod-helpserv.c
index 76431a9fe9e17196980df88acdb22471b2f7c135..5726a8ed7fa6af94aa97f9040b76b0f9576d86e5 100644 (file)
@@ -4130,7 +4130,7 @@ helpserv_define_func(const char *name, helpserv_func_t *func, enum helpserv_leve
 }
 
 /* Drop requests that persist until part when a user leaves the chan */
-static void handle_part(struct modeNode *mn, UNUSED_ARG(const char *reason)) {
+static void handle_part(struct modeNode *mn, UNUSED_ARG(const char *reason), UNUSED_ARG(void *extra)) {
     struct helpserv_botlist *botlist;
     struct helpserv_userlist *userlist;
     const int from_opserv = 0; /* for helpserv_notice */
@@ -4226,7 +4226,7 @@ static void handle_part(struct modeNode *mn, UNUSED_ARG(const char *reason)) {
  *
  * Unassign requests where req->helper persists until the helper parts or
  * quits. */
-static void handle_quit(struct userNode *user, UNUSED_ARG(struct userNode *killer), UNUSED_ARG(const char *why)) {
+static void handle_quit(struct userNode *user, UNUSED_ARG(struct userNode *killer), UNUSED_ARG(const char *why), UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *reqlist;
     struct helpserv_userlist *userlist;
     unsigned int i, n;
@@ -4374,7 +4374,7 @@ static void associate_requests_bychan(struct chanNode *chan, struct userNode *us
 /* Greet users upon joining a helpserv channel (if greeting is set) and set
  * req->user to the user joining for all requests owned by the user's handle
  * (if any) with a req->user == NULL */
-static int handle_join(struct modeNode *mNode) {
+static int handle_join(struct modeNode *mNode, UNUSED_ARG(void *extra)) {
     struct userNode *user = mNode->user;
     struct chanNode *chan = mNode->channel;
     struct helpserv_botlist *botlist;
@@ -4445,7 +4445,7 @@ static int handle_join(struct modeNode *mNode) {
 }
 
 /* Update helpserv_reqs_bynick_dict upon nick change */
-static void handle_nickchange(struct userNode *user, const char *old_nick) {
+static void handle_nickchange(struct userNode *user, const char *old_nick, UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *reqlist;
     unsigned int i;
 
@@ -4465,7 +4465,7 @@ static void handle_nickchange(struct userNode *user, const char *old_nick) {
 }
 
 /* Also update helpserv_reqs_byhand_dict upon handle rename */
-static void handle_nickserv_rename(struct handle_info *handle, const char *old_handle) {
+static void handle_nickserv_rename(struct handle_info *handle, const char *old_handle, UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *reqlist;
     struct helpserv_userlist *userlist;
     unsigned int i;
@@ -4518,7 +4518,7 @@ static void handle_nickserv_rename(struct handle_info *handle, const char *old_h
  *      have req->user set).
  * - In either of the above cases, if a user is on a bot's userlist and has
  *   requests assigned to them, it will give them a list. */
-static void handle_nickserv_auth(struct userNode *user, struct handle_info *old_handle) {
+static void handle_nickserv_auth(struct userNode *user, struct handle_info *old_handle, UNUSED_ARG(void* extra)) {
     struct helpserv_reqlist *reqlist, *dellist=NULL, *hand_reqlist, *oldhand_reqlist;
     struct helpserv_userlist *userlist;
     unsigned int i, j;
@@ -4685,7 +4685,7 @@ static void handle_nickserv_auth(struct userNode *user, struct handle_info *old_
  *
  * Also, remove the user from all bots that it has access in.
  * helpserv_del_user() will take care of unassigning the requests. */
-static void handle_nickserv_unreg(struct userNode *user, struct handle_info *handle) {
+static void handle_nickserv_unreg(struct userNode *user, struct handle_info *handle, UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *hand_reqlist;
     struct helpserv_userlist *userlist;
     unsigned int i, n;
@@ -4768,7 +4768,7 @@ static void handle_nickserv_unreg(struct userNode *user, struct handle_info *han
     dict_remove(helpserv_reqs_byhand_dict, handle->handle);
 }
 
-static void handle_nickserv_merge(struct userNode *user, struct handle_info *handle_to, struct handle_info *handle_from) {
+static void handle_nickserv_merge(struct userNode *user, struct handle_info *handle_to, struct handle_info *handle_from, UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *reqlist_from, *reqlist_to;
     unsigned int i;
 
@@ -4800,7 +4800,7 @@ static void handle_nickserv_merge(struct userNode *user, struct handle_info *han
     }
 }
 
-static void handle_nickserv_allowauth(struct userNode *user, struct userNode *target, struct handle_info *handle) {
+static void handle_nickserv_allowauth(struct userNode *user, struct userNode *target, struct handle_info *handle, UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *reqlist;
     unsigned int i;
 
@@ -4819,7 +4819,7 @@ static void handle_nickserv_allowauth(struct userNode *user, struct userNode *ta
     }
 }
 
-static void handle_nickserv_failpw(struct userNode *user, struct handle_info *handle) {
+static void handle_nickserv_failpw(struct userNode *user, struct handle_info *handle, UNUSED_ARG(void *extra)) {
     struct helpserv_reqlist *reqlist;
     unsigned int i;
 
@@ -4897,10 +4897,10 @@ helpserv_define_option(const char *name, helpserv_option_func_t *func) {
     dict_insert(helpserv_option_dict, name, func);
 }
 
-static void helpserv_db_cleanup(void) {
+static void helpserv_db_cleanup(UNUSED_ARG(void *extra)) {
     shutting_down=1;
-    unreg_part_func(handle_part);
-    unreg_del_user_func(handle_quit);
+    unreg_part_func(handle_part, NULL);
+    unreg_del_user_func(handle_quit, NULL);
     close_helpfile(helpserv_helpfile);
     dict_delete(helpserv_func_dict);
     dict_delete(helpserv_option_dict);
@@ -5018,19 +5018,19 @@ int helpserv_init() {
     }
     timeq_add(helpserv_next_stats(now), helpserv_timed_run_stats, NULL);
 
-    reg_join_func(handle_join);
-    reg_part_func(handle_part); /* also deals with kick */
-    reg_nick_change_func(handle_nickchange);
-    reg_del_user_func(handle_quit);
+    reg_join_func(handle_join, NULL);
+    reg_part_func(handle_part, NULL); /* also deals with kick */
+    reg_nick_change_func(handle_nickchange, NULL);
+    reg_del_user_func(handle_quit, NULL);
 
-    reg_auth_func(handle_nickserv_auth);
-    reg_handle_rename_func(handle_nickserv_rename);
-    reg_unreg_func(handle_nickserv_unreg);
-    reg_allowauth_func(handle_nickserv_allowauth);
-    reg_failpw_func(handle_nickserv_failpw);
-    reg_handle_merge_func(handle_nickserv_merge);
+    reg_auth_func(handle_nickserv_auth, NULL);
+    reg_handle_rename_func(handle_nickserv_rename, NULL);
+    reg_unreg_func(handle_nickserv_unreg, NULL);
+    reg_allowauth_func(handle_nickserv_allowauth, NULL);
+    reg_failpw_func(handle_nickserv_failpw, NULL);
+    reg_handle_merge_func(handle_nickserv_merge, NULL);
 
-    reg_exit_func(helpserv_db_cleanup);
+    reg_exit_func(helpserv_db_cleanup, NULL);
 
     helpserv_module = module_register("helpserv", HS_LOG, HELPSERV_HELPFILE_NAME, helpserv_expand_variable);
     modcmd_register(helpserv_module, "helpserv", cmd_helpserv, 1, MODCMD_REQUIRE_AUTHED|MODCMD_NO_LOG|MODCMD_NO_DEFAULT_BIND, "level", "800", NULL);