From f36b00f4d496cb90c8c77d0e6ae570502f3199ae Mon Sep 17 00:00:00 2001
From: Mattes D
Date: Wed, 13 May 2015 18:31:01 +0200
Subject: All in-game commands go through the OnExecuteCommand hook.
Everything that has a slash at the beginning, doesn't matter if it is a registered command or not.
---
MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
(limited to 'MCServer/Plugins')
diff --git a/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua b/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
index 79b7bb055..db7eb97d1 100644
--- a/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
+++ b/MCServer/Plugins/APIDump/Hooks/OnExecuteCommand.lua
@@ -16,10 +16,9 @@ return
If the command is in-game, the first parameter to the hook function is the {{cPlayer|player}} who's
executing the command. If the command comes from the server console, the first parameter is nil.
- The server calls this hook even for unregistered (unknown) console commands. However, it doesn't call
- the hook for unregistered in-game commands, simply because there's no way to distinguish between a
- command and a chat message. If a plugin needs to intercept unknown in-game commands, it should use the
- {{OnChat|HOOK_CHAT}} hook.
+ The server calls this hook even for unregistered (unknown) console commands. It also calls the hook
+ for unknown in-game commands, as long as they begin with a slash ('/'). If a plugin needs to intercept
+ in-game chat messages not beginning with a slash, it should use the {{OnChat|HOOK_CHAT}} hook.
]],
Params =
{
--
cgit v1.2.3