Core modules cannot be unloaded, otherwise bad things happen.
Additionally some information is logged and passed to the operator conducting a MODRESTART.
This commit is contained in:
parent
94afbe9c8e
commit
b5cfad0319
2 changed files with 16 additions and 1 deletions
|
@ -349,7 +349,19 @@ do_modrestart(struct Client *source_p)
|
|||
RB_DLINK_FOREACH_SAFE(ptr, nptr, module_list.head)
|
||||
{
|
||||
struct module *mod = ptr->data;
|
||||
unload_one_module(mod->name, false);
|
||||
if(!unload_one_module(mod->name, false))
|
||||
{
|
||||
ilog(L_MAIN, "Module Restart: %s was not unloaded %s",
|
||||
mod->name,
|
||||
mod->core? "(core module)" : "");
|
||||
|
||||
if(!mod->core)
|
||||
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
|
||||
"Module Restart: %s failed to unload",
|
||||
mod->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
modnum++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue