| Main index | Section 8 | Options | 
Before using the functionality provided by hook.lua, it must be included with a statement such as the following:
local hook = require("hook")
| hook.registerType(hooktype) | |
| Adds hooktype as a recognized hook type. This allows functions to be added to run when hooks of this type are invoked using hook.runAll(hooktype). | |
| hook.register(hooktype, hookfunc) | |
| Register hookfunc to be run when hooks of type hooktype are invoked. | |
| hook.runAll(hooktype) | |
| Invoke all hooks registered for type hooktype. Hooks are invoked in the order in which they are registered. | |
local hook = require("hook")
local function configuration_was_reloaded()
        print("Configuration was reloaded!")
end
hook.register("config.reloaded", configuration_was_reloaded)
| HOOK.LUA (8) | June 9, 2018 | 
| Main index | Section 8 | Options | 
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Unix...best if used before: Tue Jan 19 03:14:08 GMT 2038 | ” |