summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/HookNotify
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-21 14:47:01 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-21 14:47:01 +0100
commit99876ea4bae68af856e1b7a231b180cdb1ffef32 (patch)
treed78bb997a9536709d9d2c31f09afaf1b153b81e7 /MCServer/Plugins/HookNotify
parentCore: Players console command now shows players' IP addresses (patch contributed by STR_Warrior) (diff)
downloadcuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.tar
cuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.tar.gz
cuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.tar.bz2
cuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.tar.lz
cuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.tar.xz
cuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.tar.zst
cuberite-99876ea4bae68af856e1b7a231b180cdb1ffef32.zip
Diffstat (limited to 'MCServer/Plugins/HookNotify')
-rw-r--r--MCServer/Plugins/HookNotify/HookNotify.lua16
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