}
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Cannot locate module %s", path);
+
+ if (server_state_foreground)
+ ierror("cannot locate module %s", path);
+
return false;
}
rb_dlinkDelete(&mod->node, &module_list);
rb_free(mod->name);
+ rb_free(mod->path);
rb_free(mod);
if(warn)
int priority = m->priority;
if (priority == 0)
priority = HOOK_NORMAL;
- add_hook(m->hapi_name, m->fn);
+ add_hook_prio(m->hapi_name, m->fn, priority);
}
}
mod->mapi_header = mapi_version;
mod->mapi_version = MAPI_VERSION(*mapi_version);
mod->origin = origin;
+ mod->path = rb_strdup(path);
rb_dlinkAdd(mod, &mod->node, &module_list);
if(warn)
int check_core;
int origin;
char *m_bn = rb_basename(info->module);
+ char *path;
struct Client *source_p = find_id(info->id);
if((mod = findmodule_byname(m_bn)) == NULL)
origin = mod->origin;
check_core = mod->core;
+ path = rb_strdup(mod->path);
mod_remember_clicaps();
if (source_p) sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
rb_free(info);
rb_free(m_bn);
+ rb_free(path);
return;
}
- if((load_one_module(m_bn, origin, check_core) == false) && check_core)
+ if((load_a_module(path, true, origin, check_core) == false) && check_core)
{
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
"Error reloading core module: %s: terminating ircd", m_bn);
rb_free(info);
rb_free(m_bn);
+ rb_free(path);
}
void