summaryrefslogtreecommitdiff
path: root/src/modules.cpp
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 /src/modules.cpp
parentbbc6a0bbbe7475e5e1d0c4f2418c6fe6e0e952b7 (diff)
Handle module reloading in core_reloadmodule entirely
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 9e653a4ab..79a71652c 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -451,26 +451,6 @@ namespace
ServerInstance->GlobalCulls.AddItem(this);
}
};
-
- struct ReloadAction : public HandlerBase0<void>
- {
- Module* const mod;
- HandlerBase1<void, bool>* const callback;
- ReloadAction(Module* m, HandlerBase1<void, bool>* c)
- : mod(m), callback(c) {}
- void Call()
- {
- DLLManager* dll = mod->ModuleDLLManager;
- std::string name = mod->ModuleSourceFile;
- ServerInstance->Modules->DoSafeUnload(mod);
- ServerInstance->GlobalCulls.Apply();
- delete dll;
- bool rv = ServerInstance->Modules->Load(name);
- if (callback)
- callback->Call(rv);
- ServerInstance->GlobalCulls.AddItem(this);
- }
- };
}
bool ModuleManager::Unload(Module* mod)
@@ -481,14 +461,6 @@ bool ModuleManager::Unload(Module* mod)
return true;
}
-void ModuleManager::Reload(Module* mod, HandlerBase1<void, bool>* callback)
-{
- if (CanUnload(mod))
- ServerInstance->AtomicActions.AddAction(new ReloadAction(mod, callback));
- else if (callback)
- callback->Call(false);
-}
-
void ModuleManager::LoadAll()
{
std::map<std::string, ServiceList> servicemap;