summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2014-05-18 17:16:02 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2014-05-18 17:16:02 +0200
commitcfd3c33dfa38c946151a1c4d3ba780f7733963c0 (patch)
tree68301102af1e69ffd0660005c97baf98168825e9 /src
parentAdded load cmd (diff)
downloadcuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.tar
cuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.tar.gz
cuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.tar.bz2
cuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.tar.lz
cuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.tar.xz
cuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.tar.zst
cuberite-cfd3c33dfa38c946151a1c4d3ba780f7733963c0.zip
Diffstat (limited to '')
-rw-r--r--src/Server.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Server.cpp b/src/Server.cpp
index 8e222b743..e71e728a6 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -29,6 +29,7 @@
#include <fstream>
#include <sstream>
#include <iostream>
+#include <list>
extern "C" {
#include "zlib/zlib.h"
@@ -481,6 +482,7 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
if (split.size() > 1)
{
cPluginManager::Get()->LoadPlugin(split[1]);
+
return;
}
else
@@ -490,20 +492,22 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
return;
}
}
- /*
- * TODO: Declare unload command
+
if (split[0] == "unload")
{
if (split.size() > 1)
{
-
+ cPluginManager::Get()->RemovePlugin(cPluginManager::Get()->GetPlugin(split[1]));
+ return;
}
else
{
-
+ a_Output.Out("No plugin given! Command: unload <pluginname>");
+ a_Output.Finished();
+ return;
}
}
- */
+
// There is currently no way a plugin can do these (and probably won't ever be):
if (split[0].compare("chunkstats") == 0)
{