diff options
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/HookNotify/HookNotify.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/MCServer/Plugins/HookNotify/HookNotify.lua b/MCServer/Plugins/HookNotify/HookNotify.lua index 92cc2e059..ed463c5ca 100644 --- a/MCServer/Plugins/HookNotify/HookNotify.lua +++ b/MCServer/Plugins/HookNotify/HookNotify.lua @@ -23,6 +23,7 @@ function Initialize(Plugin) PluginManager:AddHook(Plugin, cPluginManager.HOOK_COLLECTING_PICKUP);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_CRAFTING_NO_RECIPE);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_DISCONNECT);
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_EXECUTE_COMMAND);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_HANDSHAKE);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_KILLING);
PluginManager:AddHook(Plugin, cPluginManager.HOOK_LOGIN);
@@ -174,6 +175,21 @@ end +function OnExecuteCommand(...)
+ LogHook("OnExecuteCommand", unpack(arg));
+
+ -- For some reason logging doesn't work for this callback, so list some stuff manually to verify:
+ LOG("arg1 type: " .. type(arg[1]));
+ if (arg[1] ~= nil) then
+ LOG("Player name: " .. arg[1]:GetName());
+ end
+ LOG("Command: " .. arg[2][1]);
+end
+
+
+
+
+
function OnHandshake(...)
LogHook("OnHandshake", unpack(arg));
end
|