From c290d09c454324614a93039364fe62a7b7b75cbb Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 26 Nov 2015 13:36:44 +0100 Subject: Handle module reloading in core_reloadmodule entirely --- include/modules.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index c938e6a9d..f86f88087 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1035,9 +1035,6 @@ class CoreExport ModuleManager : public fakederef PRIO_STATE_LAST } prioritizationState; - /** Internal unload module hook */ - bool CanUnload(Module*); - /** Loads all core modules (cmd_*) */ void LoadCoreModules(std::map& servicemap); @@ -1165,18 +1162,19 @@ class CoreExport ModuleManager : public fakederef */ bool Unload(Module* module); - /** Run an asynchronous reload of the given module. When the reload is - * complete, the callback will be run with true if the reload succeeded - * and false if it did not. - */ - void Reload(Module* module, HandlerBase1* callback); - /** Called by the InspIRCd constructor to load all modules from the config file. */ void LoadAll(); void UnloadAll(); void DoSafeUnload(Module*); + /** Check if a module can be unloaded and if yes, prepare it for unload + * @param mod Module to be unloaded + * @return True if the module is unloadable, false otherwise. + * If true the module must be unloaded in the current main loop iteration. + */ + bool CanUnload(Module* mod); + /** Find a module by name, and return a Module* to it. * This is preferred over iterating the module lists yourself. * @param name The module name to look up -- cgit v1.3.1-10-gc9f91