diff options
Diffstat (limited to '')
-rw-r--r-- | src/Server.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index df2c7deef..9c5c6b6eb 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -464,22 +464,11 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac { if (split.size() > 1) { - cPluginManager::PluginMap map = cPluginManager::Get()->GetAllPlugins(); - - for (auto plugin_entry : map) - { - if (plugin_entry.first == split[1]) - { - a_Output.Out("Error! Plugin is already loaded!"); - a_Output.Finished(); - return; - } - } a_Output.Out(cPluginManager::Get()->LoadPlugin(split[1]) ? "Plugin loaded" : "Error occurred loading plugin"); } else { - a_Output.Out("Usage: load <pluginname>"); + a_Output.Out("Usage: load <PluginFolder>"); } a_Output.Finished(); return; @@ -488,12 +477,12 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac { if (split.size() > 1) { - cPluginManager::Get()->RemovePlugin(cPluginManager::Get()->GetPlugin(split[1])); - a_Output.Out("Plugin unloaded"); + cPluginManager::Get()->UnloadPlugin(split[1]); + a_Output.Out("Plugin unload scheduled"); } else { - a_Output.Out("Usage: unload <pluginname>"); + a_Output.Out("Usage: unload <PluginFolder>"); } a_Output.Finished(); return; |