1
0
This commit is contained in:
Tiger Wang
2014-10-20 19:01:53 +01:00
36 changed files with 281 additions and 234 deletions

View File

@@ -485,6 +485,17 @@ 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