1
0

Fixed cPluginManager:AddHook() binding.

Fixes #401. Old formats are still accepted, for compatibility reasons.
This commit is contained in:
madmaxoft
2014-01-05 15:46:45 +01:00
parent 0a712931b1
commit 84bf32f857
5 changed files with 37 additions and 11 deletions

View File

@@ -963,3 +963,22 @@ end
-- Test the hook adding formats in #121 and #401
local function DoNothing()
end
LOG("Trying cPluginManager:AddHook()");
cPluginManager:AddHook(cPluginManager.HOOK_CHAT, DoNothing);
LOG("Trying cPluginManager.AddHook()");
cPluginManager.AddHook(cPluginManager.HOOK_CHAT, DoNothing);
LOG("Trying cPluginManager:Get():AddHook()");
cPluginManager:Get():AddHook(cPluginManager.HOOK_CHAT, DoNothing);
LOG("Trying cPluginManager:Get():AddHook(Plugin, Hook)");
cPluginManager:Get():AddHook(cPluginManager:GetCurrentPlugin(), cPluginManager.HOOK_CHAT);
LOG("Trying cPluginManager.AddHook(Plugin, Hook)");
cPluginManager.AddHook(cPluginManager:GetCurrentPlugin(), cPluginManager.HOOK_CHAT);