]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/modules.c
legacy irc sprintf gone
[irc/rqf/shadowircd.git] / src / modules.c
index b8f42c4bbfdf41ce577d57a1957a4dab52dc9313..115f511d215bc305dc6cb969ffc697b35c91f148 100644 (file)
@@ -28,7 +28,7 @@
 
 
 #include "modules.h"
-#include "s_log.h"
+#include "logger.h"
 #include "ircd.h"
 #include "client.h"
 #include "send.h"
@@ -38,7 +38,6 @@
 #include "parse.h"
 #include "ircd_defs.h"
 #include "irc_string.h"
-#include "sprintf_irc.h"
 
 
 
@@ -69,7 +68,6 @@ static const char *core_module_table[] = {
        "m_part",
        "m_quit",
        "m_server",
-       "m_sjoin",
        "m_squit",
        NULL
 };
@@ -164,7 +162,7 @@ mod_add_path(const char *path)
        if(mod_find_path(path))
                return;
 
-       pathst = MyMalloc(sizeof(struct module_path));
+       pathst = rb_malloc(sizeof(struct module_path));
 
        strcpy(pathst->path, path);
        rb_dlinkAddAlloc(pathst, &mod_paths);
@@ -184,7 +182,7 @@ mod_clear_paths(void)
        RB_DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
        {
                rb_free(ptr->data);
-               free_rb_dlink_node(ptr);
+               rb_free_rb_dlink_node(ptr);
        }
 
        mod_paths.head = mod_paths.tail = NULL;
@@ -200,7 +198,7 @@ mod_clear_paths(void)
 char *
 irc_basename(const char *path)
 {
-       char *mod_basename = MyMalloc(strlen(path) + 1);
+       char *mod_basename = rb_malloc(strlen(path) + 1);
        const char *s;
 
        if(!(s = strrchr(path, '/')))
@@ -248,7 +246,7 @@ load_all_modules(int warn)
 
        modules_init();
 
-       modlist = (struct module **) MyMalloc(sizeof(struct module) * (MODS_INCREMENT));
+       modlist = (struct module **) rb_malloc(sizeof(struct module) * (MODS_INCREMENT));
 
        max_mods = MODS_INCREMENT;
 
@@ -888,11 +886,11 @@ load_a_module(const char *path, int warn, int core)
 
        increase_modlist();
 
-       modlist[num_mods] = MyMalloc(sizeof(struct module));
+       modlist[num_mods] = rb_malloc(sizeof(struct module));
        modlist[num_mods]->address = tmpptr;
        modlist[num_mods]->version = ver;
        modlist[num_mods]->core = core;
-       DupString(modlist[num_mods]->name, mod_basename);
+       modlist[num_mods]->name = rb_strdup(mod_basename);
        modlist[num_mods]->mapi_header = mapi_version;
        modlist[num_mods]->mapi_version = MAPI_VERSION(*mapi_version);
        num_mods++;
@@ -925,7 +923,7 @@ increase_modlist(void)
        if((num_mods + 1) < max_mods)
                return;
 
-       new_modlist = (struct module **) MyMalloc(sizeof(struct module) *
+       new_modlist = (struct module **) rb_malloc(sizeof(struct module) *
                                                  (max_mods + MODS_INCREMENT));
        memcpy((void *) new_modlist, (void *) modlist, sizeof(struct module) * num_mods);