summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-11-26 13:36:44 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-11-26 13:36:44 +0100
commitc290d09c454324614a93039364fe62a7b7b75cbb (patch)
tree6c68b27d78629dfe5fa8c5aa41b760e2e9e44b40 /include
parentbbc6a0bbbe7475e5e1d0c4f2418c6fe6e0e952b7 (diff)
Handle module reloading in core_reloadmodule entirely
Diffstat (limited to 'include')
-rw-r--r--include/modules.h16
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