Hook Manager

Hook Manager

The hook manager is a Lua object that is used to call out to Lua hooks.

Attributes

The hook manager has the following attributes:

Attribute Type Description
hooks Table The hook library, if any, read from the Lua include path.
service_context Table The service context for the networks session.
input_context Table The input context for the networks session.

Methods

Note that as the hook manager is a Lua object, its methods should be accessed using the colon operator, e.g.:

hook_manager:do_hook (...)

do_hook

This function calls the given hook, using the hooks library from the Lua include path.

If no hooks library is available or the specific hook function is not implemented, control will return to the main flow.

Otherwise, the hook function will be called and the main flow will yield until the library function is complete.

This function takes a single required positional parameter, the name of the hook function to call. All subsequent parameters are passed directly to the hook.