1
0
Fork 0

Added unload <pluginname> command

This commit is contained in:
Julian Laubstein 2014-05-18 17:16:02 +02:00
parent 19f4cd0547
commit cfd3c33dfa
1 changed files with 9 additions and 5 deletions

View File

@ -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)
{