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 */
}
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);
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;
}
/* 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 */
}
/* 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;
* 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;
*
* 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;
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;
}
}
-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;
}
}
-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;
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);
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_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);