diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-12-01 12:23:50 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-12-01 12:23:50 +0100 |
commit | 44b5a8fa89d8c2bda767c0d5fe77c4d31061ce2b (patch) | |
tree | 0f1b3d375efd8584858e7df906de6bc322f4b5c6 /include/modules.h | |
parent | 0a12e928e61cdb5366f0ad8ffb9d912eb14c5878 (diff) | |
parent | 19cc9292ab5889fa09962820f3179e8078bec956 (diff) |
Merge branch 'master+reloadmod'
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 16 |
1 files changed, 7 insertions, 9 deletions
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<ModuleManager> PRIO_STATE_LAST } prioritizationState; - /** Internal unload module hook */ - bool CanUnload(Module*); - /** Loads all core modules (cmd_*) */ void LoadCoreModules(std::map<std::string, ServiceList>& servicemap); @@ -1165,18 +1162,19 @@ class CoreExport ModuleManager : public fakederef<ModuleManager> */ 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<void, bool>* 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 |