events

The events namespace contains functions that are used for working with daochook events.

Functions exposed by this namespace are accessed via the prefix: hook.events.

Functions

register

Registers a new callback function to the given event.

1boolean hook.events.register(event_name, event_alias, callback_func);
Parameter NameTypeDescription
event_namestringThe name of the event to register this callback to.
event_aliasstringThe alias for this callback.
callback_funcfunctionThe function to invoke when the event is raised.
Returns
(boolean) True on success, false otherwise.

unregister

Unregisters an existing callback from the given event.

1boolean hook.events.unregister(event_name, event_alias);
Parameter NameTypeDescription
event_namestringThe name of the event to unregister the existing callback for.
event_aliasstringThe alias for the existing callback to unregister.
Returns
(boolean) True on success, false otherwise.