Class XChatHook

Callback hook handler.

class XChatHook

more...

Summary

callbackCallable item that gets called when the event bound with this hook happens
matchEvent name, server message or command that is intercepted by this hook
unhook()Removes the handler associated with this hook.

Detailed description

Callback hook handler.

An instance of this class is returned by hook functions. The instance can be used to cancel the hook (trhough the XChatHook.unhook method) or to modify the callback that is performed when the hook intercepts an event, message, command or timeout completion by changing the callback property.

This class cannot be directly instantiated; it can only be returned by one of the XChat hook functions.

Properties

callback

Callable item that gets called when the event bound with this hook happens

match

Event name, server message or command that is intercepted by this hook

Methods

unhook()

Removes the handler associated with this hook.

XChatHook.unhook( )

This method can be safely called even by the callback handler itself, if it doesn't want to be called again.

Note: If a script callback terminates and the script has not any active hook anymore, it is automatically unloaded.


Made with faldoc 2.1.0