Implements additional plugin hooks

The following plugin hooks have been implemented

onEnable(hook, hook_config)
onDisable(hook, hook_config)
onUpdateConfig(hook, hook_config)
onLoad(hook, hook_config)
onUnload(hook, hook_config)

Documentation is part of the commit.

Implements #4451
Implements #4453
Implements #4454
Implements #4455
This commit is contained in:
Simone Mainardi 2020-09-21 18:25:14 +02:00
parent f83ccb70d5
commit 3ad4522e45
5 changed files with 146 additions and 40 deletions

View file

@ -83,9 +83,41 @@ local script = {
-- #################################################################
-- @brief See host/example.lua
function script.onUpdateConfig(confid, config)
print("on update:" .. script.key.. " confid: "..confid.."\n")
tprint(config)
function script.onLoad(hook, hook_config)
tprint("loading: "..hook)
-- tprint(hook_config)
end
-- #################################################################
-- @brief See host/example.lua
function script.onUnload(hook, hook_config)
tprint("unloading: "..hook)
-- tprint(hook_config)
end
-- #################################################################
-- @brief See host/example.lua
function script.onEnable(hook, hook_config)
tprint("[+] enabling: "..hook)
-- tprint(hook_config)
end
-- #################################################################
-- @brief See host/example.lua
function script.onDisable(hook, hook_config)
tprint("[-] disabling: "..hook)
-- tprint(hook_config)
end
-- #################################################################
-- @brief See host/example.lua
function script.onUpdateConfig(hook, hook_config)
tprint("[~] config change: "..hook)
-- tprint(hook_config)
end
-- #################################################################