summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-19 10:57:41 +0200
committerMattes D <github@xoft.cz>2015-04-19 10:57:41 +0200
commita9b5a6c3a63d8500f3c512574fd802d40b562661 (patch)
treee6d0d362ed42116d6c9deaaa789287f464569514 /src/Server.cpp
parentMerge pull request #1869 from mathias-gh/master (diff)
downloadcuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar
cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.gz
cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.bz2
cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.lz
cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.xz
cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.zst
cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.zip
Diffstat (limited to 'src/Server.cpp')
-rw-r--r--src/Server.cpp19
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;