summaryrefslogtreecommitdiffstats
path: root/source/cPluginManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cPluginManager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp
index 99523183e..eea9f1c01 100644
--- a/source/cPluginManager.cpp
+++ b/source/cPluginManager.cpp
@@ -12,6 +12,7 @@
#include "cSquirrelCommandBinder.h"
#include "../iniFile/iniFile.h"
#include "tolua++.h"
+#include "cPlayer.h"
#include "squirrelbindings/SquirrelBindings.h"
#include "squirrelbindings/SquirrelFunctions.h"
@@ -206,6 +207,14 @@ bool cPluginManager::CallHook(PluginHook a_Hook, unsigned int a_NumArgs, ...)
return true;
}
+ //Check if it was a standard command (starts with a slash)
+ if(Message[0] == '/')
+ {
+ Player->SendMessage("Unknown Command");
+ LOGINFO("Player \"%s\" issued command: %s", Player->GetName().c_str(), Message);
+ return true; //Cancel sending
+ }
+
if (Plugins == m_Hooks.end())
{
return false;