]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/mod-memoserv.c
Couple of srvx updates.
[irc/evilnet/x3.git] / src / mod-memoserv.c
index edcef8bfc4f721664901c462e959e9bd045195bc..0900687158d9679cfccd920713f6d62d19e67f6e 100644 (file)
@@ -364,7 +364,7 @@ memoserv_can_send(struct userNode *bot, struct userNode *user, struct memo_accou
 
     if (acct->handle->ignores->used) {
         for (i=0; i < acct->handle->ignores->used; i++) {
-            if (user_matches_glob(user, acct->handle->ignores->list[i], MATCH_USENICK)) {
+            if (user_matches_glob(user, acct->handle->ignores->list[i], MATCH_USENICK, 0)) {
                 match = 1;
                 break;
             }
@@ -1273,14 +1273,14 @@ memoserv_saxdb_write(struct saxdb_context *ctx)
 }
 
 static void
-memoserv_cleanup(void)
+memoserv_cleanup(UNUSED_ARG(void *extra))
 {
     dict_delete(memos);
     dict_delete(historys);
 }
 
 static void
-memoserv_check_messages(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle))
+memoserv_check_messages(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle), UNUSED_ARG(void *extra))
 {
     unsigned int ii, unseen;
     struct memo_account *ma;
@@ -1301,7 +1301,7 @@ memoserv_check_messages(struct userNode *user, UNUSED_ARG(struct handle_info *ol
 }
 
 static void
-memoserv_rename_account(struct handle_info *hi, const char *old_handle)
+memoserv_rename_account(struct handle_info *hi, const char *old_handle, UNUSED_ARG(void *extra))
 {
     struct memo_account *ma;
     if (!(ma = dict_find(memos, old_handle, NULL)))
@@ -1314,7 +1314,7 @@ memoserv_rename_account(struct handle_info *hi, const char *old_handle)
 }
 
 static void
-memoserv_unreg_account(UNUSED_ARG(struct userNode *user), struct handle_info *handle)
+memoserv_unreg_account(UNUSED_ARG(struct userNode *user), struct handle_info *handle, UNUSED_ARG(void *extra))
 {
     dict_remove(memos, handle->handle);
     dict_remove(historys, handle->handle);
@@ -1327,11 +1327,11 @@ memoserv_init(void)
     memos = dict_new();
     historys = dict_new();
     dict_set_free_data(memos, delete_memo_account);
-    reg_auth_func(memoserv_check_messages);
-    reg_handle_rename_func(memoserv_rename_account);
-    reg_unreg_func(memoserv_unreg_account);
+    reg_auth_func(memoserv_check_messages, NULL);
+    reg_handle_rename_func(memoserv_rename_account, NULL);
+    reg_unreg_func(memoserv_unreg_account, NULL);
     conf_register_reload(memoserv_conf_read);
-    reg_exit_func(memoserv_cleanup);
+    reg_exit_func(memoserv_cleanup, NULL);
     saxdb_register("MemoServ", memoserv_saxdb_read, memoserv_saxdb_write);
 
     memoserv_module = module_register("MemoServ", MS_LOG, "mod-memoserv.help", NULL);
@@ -1382,6 +1382,7 @@ memoserv_finalize(void) {
         memoserv = memoserv_conf.bot;
         const char *modes = conf_get_data("modules/memoserv/modes", RECDB_QSTRING);
         memoserv = AddLocalUser(str, str, NULL, "User-User Memorandum Services", modes);
+        service_register(memoserv);
     } else {
         log_module(MS_LOG, LOG_ERROR, "database_get_data for memoserv_conf.bot failed!");
         exit(1);