Added unload <pluginname> command
This commit is contained in:
parent
19f4cd0547
commit
cfd3c33dfa
@ -29,6 +29,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "zlib/zlib.h"
|
#include "zlib/zlib.h"
|
||||||
@ -481,6 +482,7 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
|
|||||||
if (split.size() > 1)
|
if (split.size() > 1)
|
||||||
{
|
{
|
||||||
cPluginManager::Get()->LoadPlugin(split[1]);
|
cPluginManager::Get()->LoadPlugin(split[1]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -490,20 +492,22 @@ void cServer::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallbac
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* TODO: Declare unload command
|
|
||||||
if (split[0] == "unload")
|
if (split[0] == "unload")
|
||||||
{
|
{
|
||||||
if (split.size() > 1)
|
if (split.size() > 1)
|
||||||
{
|
{
|
||||||
|
cPluginManager::Get()->RemovePlugin(cPluginManager::Get()->GetPlugin(split[1]));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
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):
|
// There is currently no way a plugin can do these (and probably won't ever be):
|
||||||
if (split[0].compare("chunkstats") == 0)
|
if (split[0].compare("chunkstats") == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user