X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/a6f63a829e22fa83a4551cb9aad3e316e7c8bb18..9dd98618d044c63ba4d30c79350f4b6a4a2c3453:/ircd/modules.c diff --git a/ircd/modules.c b/ircd/modules.c index 7e466d65..bf010cb2 100644 --- a/ircd/modules.c +++ b/ircd/modules.c @@ -51,6 +51,7 @@ static const char *core_module_table[] = { "m_ban", "m_die", "m_error", + "m_identified", "m_join", "m_kick", "m_kill", @@ -224,8 +225,8 @@ load_all_modules(bool warn) if(len > module_ext_len && rb_strncasecmp(ldirent->d_name + (len - module_ext_len), LT_MODULE_EXT, module_ext_len) == 0) { - (void) snprintf(module_fq_name, sizeof(module_fq_name), "%s%c%s", - ircd_paths[IRCD_PATH_AUTOLOAD_MODULES], RB_PATH_SEPARATOR, ldirent->d_name); + (void) snprintf(module_fq_name, sizeof(module_fq_name), "%s/%s", + ircd_paths[IRCD_PATH_AUTOLOAD_MODULES], ldirent->d_name); (void) load_a_module(module_fq_name, warn, MAPI_ORIGIN_CORE, false); } @@ -248,8 +249,7 @@ load_core_modules(bool warn) for (i = 0; core_module_table[i]; i++) { - snprintf(module_name, sizeof(module_name), "%s%c%s", ircd_paths[IRCD_PATH_MODULES], RB_PATH_SEPARATOR, - core_module_table[i]); + snprintf(module_name, sizeof(module_name), "%s/%s", ircd_paths[IRCD_PATH_MODULES], core_module_table[i]); if(load_a_module(module_name, warn, MAPI_ORIGIN_CORE, true) == false) { @@ -284,7 +284,7 @@ load_one_module(const char *path, int origin, bool coremodule) struct stat statbuf; const char *mpath = pathst->data; - snprintf(modpath, sizeof(modpath), "%s%c%s%s", mpath, RB_PATH_SEPARATOR, path, LT_MODULE_EXT); + snprintf(modpath, sizeof(modpath), "%s/%s%s", mpath, path, LT_MODULE_EXT); if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL)) { if(stat(modpath, &statbuf) == 0 && S_ISREG(statbuf.st_mode)) @@ -296,7 +296,7 @@ load_one_module(const char *path, int origin, bool coremodule) } } - sendto_realops_snomask(SNO_GENERAL, L_ALL, "Cannot locate module %s", path); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Cannot locate module %s", path); if (server_state_foreground) ierror("cannot locate module %s", path); @@ -400,7 +400,7 @@ unload_one_module(const char *name, bool warn) idx = serv_capindex; break; default: - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Unknown/unsupported CAP index found of type %d on capability %s when unloading %s", m->cap_index, m->cap_name, mod->name); ilog(L_MAIN, @@ -415,7 +415,7 @@ unload_one_module(const char *name, bool warn) break; } default: - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Unknown/unsupported MAPI version %d when unloading %s!", mod->mapi_version, mod->name); ilog(L_MAIN, "Unknown/unsupported MAPI version %d when unloading %s!", @@ -433,7 +433,7 @@ unload_one_module(const char *name, bool warn) if(warn) { ilog(L_MAIN, "Module %s unloaded", name); - sendto_realops_snomask(SNO_GENERAL, L_ALL, "Module %s unloaded", name); + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Module %s unloaded", name); } return true; @@ -468,7 +468,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) { const char *err = lt_dlerror(); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Error loading module %s: %s", mod_displayname, err); ilog(L_MAIN, "Error loading module %s: %s", mod_displayname, err); rb_free(mod_displayname); @@ -486,7 +486,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) && (mapi_version = (int *) (uintptr_t) lt_dlsym(tmpptr, "__mheader")) == NULL) || MAPI_MAGIC(*mapi_version) != MAPI_MAGIC_HDR) { - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Data format error: module %s has no MAPI header.", mod_displayname); ilog(L_MAIN, "Data format error: module %s has no MAPI header.", mod_displayname); @@ -504,7 +504,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) { ilog(L_MAIN, "Module %s indicated failure during load.", mod_displayname); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Module %s indicated failure during load.", mod_displayname); lt_dlclose(tmpptr); @@ -556,7 +556,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) idx = serv_capindex; break; default: - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Unknown/unsupported CAP index found of type %d on capability %s when loading %s", m->cap_index, m->cap_name, mod_displayname); ilog(L_MAIN, @@ -576,7 +576,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) { ilog(L_MAIN, "Module %s indicated failure during load.", mod_displayname); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Module %s indicated failure during load.", mod_displayname); if(mheader->mapi_cap_list) @@ -618,7 +618,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) delta /= 86400; iwarn("Module %s build date is out of sync with ircd build date by %ld days, expect problems", mod_displayname, delta); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Module %s build date is out of sync with ircd build date by %ld days, expect problems", mod_displayname, delta); } @@ -659,7 +659,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) default: ilog(L_MAIN, "Module %s has unknown/unsupported MAPI version %d.", mod_displayname, MAPI_VERSION(*mapi_version)); - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Module %s has unknown/unsupported MAPI version %d.", mod_displayname, *mapi_version); lt_dlclose(tmpptr); @@ -702,7 +702,7 @@ load_a_module(const char *path, bool warn, int origin, bool core) break; } - sendto_realops_snomask(SNO_GENERAL, L_ALL, + sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Module %s [version: %s; MAPI version: %d; origin: %s; description: \"%s\"] loaded at %p", mod_displayname, ver, MAPI_VERSION(*mapi_version), o, description, (void *) tmpptr);