summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-27 16:08:23 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-27 16:08:23 +0200
commit03551b034f1648f3c4693075448c2857294de63c (patch)
tree9ae7dac80625fded17582bc56a298b9bf5ecf706 /source
parentNew terrain generator - Noise3D. (diff)
downloadcuberite-03551b034f1648f3c4693075448c2857294de63c.tar
cuberite-03551b034f1648f3c4693075448c2857294de63c.tar.gz
cuberite-03551b034f1648f3c4693075448c2857294de63c.tar.bz2
cuberite-03551b034f1648f3c4693075448c2857294de63c.tar.lz
cuberite-03551b034f1648f3c4693075448c2857294de63c.tar.xz
cuberite-03551b034f1648f3c4693075448c2857294de63c.tar.zst
cuberite-03551b034f1648f3c4693075448c2857294de63c.zip
Diffstat (limited to 'source')
-rw-r--r--source/PluginManager.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index dc724b966..d26a0a680 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -100,6 +100,8 @@ void cPluginManager::ReloadPluginsNow(void)
FindPlugins();
+ cServer::BindBuiltInConsoleCommands();
+
cIniFile IniFile("settings.ini");
if (!IniFile.ReadFile())
{
@@ -138,7 +140,6 @@ void cPluginManager::ReloadPluginsNow(void)
{
LOG("Loaded %i plugin(s)", GetNumPlugins());
}
- cServer::BindBuiltInConsoleCommands();
}
@@ -1048,6 +1049,8 @@ void cPluginManager::UnloadPluginsNow()
RemovePlugin(m_Plugins.begin()->second);
}
+ m_Commands.clear();
+ m_ConsoleCommands.clear();
//SquirrelVM::Shutdown(); // This breaks shit
}
@@ -1251,7 +1254,14 @@ bool cPluginManager::BindConsoleCommand(const AString & a_Command, cPlugin * a_P
CommandMap::iterator cmd = m_ConsoleCommands.find(a_Command);
if (cmd != m_ConsoleCommands.end())
{
- LOGWARNING("Console command \"%s\" is already bound to plugin \"%s\".", a_Command.c_str(), cmd->second.m_Plugin->GetName().c_str());
+ if (cmd->second.m_Plugin == NULL)
+ {
+ LOGWARNING("Console command \"%s\" is already bound internally by MCServer.", a_Command.c_str());
+ }
+ else
+ {
+ LOGWARNING("Console command \"%s\" is already bound to plugin \"%s\".", a_Command.c_str(), cmd->second.m_Plugin->GetName().c_str());
+ }
return false;
}