X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/99c332f89e36cc335bc2ae1bebf4611c2a6a2609..201321bcb57b7306199c6b1ae0aed5eec2d783ad:/src/mod-helpserv.c diff --git a/src/mod-helpserv.c b/src/mod-helpserv.c index 0273872..23d0e7e 100644 --- a/src/mod-helpserv.c +++ b/src/mod-helpserv.c @@ -527,7 +527,7 @@ struct helpserv_bot { enum notification_type notify; /* This is a default; it can be changed on a per-request basis */ - enum persistence_type persist_types[PERSIST_T_COUNT]; + enum persistence_length persist_types[PERSIST_T_COUNT]; dict_t users; /* indexed by handle */ @@ -1471,7 +1471,7 @@ static void helpserv_del_user(struct helpserv_bot *hs, struct helpserv_user *hs_ } static int cmd_add_user(struct helpserv_bot *hs, int from_opserv, struct userNode *user, enum helpserv_level level, int argc, char *argv[]) { - struct helpserv_user *actor, *new_user; + struct helpserv_user *actor; struct handle_info *handle; REQUIRE_PARMS(2); @@ -1499,7 +1499,7 @@ static int cmd_add_user(struct helpserv_bot *hs, int from_opserv, struct userNod return 0; } - new_user = helpserv_add_user(hs, handle, level); + helpserv_add_user(hs, handle, level); helpserv_notice(user, "HSMSG_ADDED_USER", helpserv_level2str(level), handle->handle); return 1; @@ -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 */ @@ -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; @@ -4897,9 +4897,9 @@ 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_part_func(handle_part, NULL); unreg_del_user_func(handle_quit, NULL); close_helpfile(helpserv_helpfile); dict_delete(helpserv_func_dict); @@ -5019,18 +5019,18 @@ int helpserv_init() { timeq_add(helpserv_next_stats(now), helpserv_timed_run_stats, NULL); reg_join_func(handle_join, NULL); - reg_part_func(handle_part); /* also deals with kick */ + 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_auth_func(handle_nickserv_auth, NULL); reg_handle_rename_func(handle_nickserv_rename, NULL); - reg_unreg_func(handle_nickserv_unreg); + 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); + 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);