if cPluginManager:Get():IsPluginLoaded("Core") then cPluginManager:DoWithPlugin("Core", function (PluginHandle) if PluginHandle:GetVersion() >= 15 then if cPluginManager:CallPlugin("Core", "AddWebChatCallback", "IRChat", "OnWebChat") == true then HookedIntoCore = true LOG("[IRChat] Hooked into Core") else HookingError("Core", 1, "CallPlugin didn't return true", "Web endpoint will be unavialable") end else HookingError("Core", 2, "Your Core is outdated, the minimum version is 15", "Web endpoint will be unavialable") end end ) else HookingError("Core", 3, "Core not found", "Web endpoint will be unavialable") end
This doesn't really work. (I'm using for each plugin as a workaround atm)
Code:
[13:08:24] LUA: Plugins/IRChat/Hooks.lua:10: attempt to call method 'DoWithPlugin' (a nil value)
[13:08:24] Stack trace:
[13:08:24] Plugins/IRChat/Hooks.lua(10): (no name)
[13:08:24] Stack trace end
[13:08:24] Error in plugin IRChat calling function <callback>()