Index | | | Related pages | | | Classes | | | Objects |
class XChatHook
Callback hook handler. more...
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. |
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.
callback |
Callable item that gets called when the event bound with this hook happens.
Changing this property effectively changes the callack routine that will receive the notification. The property may be even changed by the hook callback itself, during the event handling. |
match |
Event name, server message or command that is intercepted by this hook.
This entry is read only and modifying it doesn't alter the hook functionality. To hook the same callback to another event, unhook this instance and create another hook using the callback property. |
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.
Index | | | Related pages | | | Classes | | | Objects |