diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2014-05-18 17:16:02 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2014-05-18 17:16:02 +0200 |
commit | cfd3c33dfa38c946151a1c4d3ba780f7733963c0 (patch) | |
tree | 68301102af1e69ffd0660005c97baf98168825e9 /src | |
parent | Added load cmd (diff) | |
download | cuberite-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 'src')
-rw-r--r-- | src/Server.cpp | 14 |
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) { |