summaryrefslogtreecommitdiffstats
path: root/source/cPluginManager.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-10 18:46:15 +0200
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-10 18:46:15 +0200
commit273ddcbfff87676d10c04e90ba98a74035d9d30a (patch)
tree618ad418f30685a33d8c5164cc58a36688aed338 /source/cPluginManager.cpp
parentAuthentication should work now.. (diff)
downloadcuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.tar
cuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.tar.gz
cuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.tar.bz2
cuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.tar.lz
cuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.tar.xz
cuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.tar.zst
cuberite-273ddcbfff87676d10c04e90ba98a74035d9d30a.zip
Diffstat (limited to 'source/cPluginManager.cpp')
-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;