js
The javascript plugin does not come with HexChat, more information on it can be found Here
This page is simply for hosting its API docs and is a work in progress.
print(object)
Prints text to the current context.
- param object
Object to be converted to a string
command(string)
Runs a command in the current context.
hook_print(name, callback[, userdata, priority])
Calls specified callback anytime the specified event happens. The Print Events can be found in Settings --> Text Events
.
- returns
Hook handler
hook_server(name, callback[, userdata, priority])
Calls specified callback anytime the specified event happens.
- param name
IRC numeric or named event
- returns
Hook handler
hook_command(name, callback[, userdata, priority])
Calls specified callback anytime the specified command is run.
- returns
Hook handler
hook_special(name, callback[, userdata, priority])
Calls specified callback anytime the specified special event happens.
Special Events:
- Open Context
- Close Context
- Focus Tab
- Focus Window
- DCC Chat Text
- Key Press
- returns
Hook handler
hook_timer(timeout, callback[, userdata])
Calls specified callback in your specified interval (in milliseconds).
If you return true the callback will continue to be called, otherwise it is removed.
- returns
Hook handler
hook_unload(callback[, userdata])
Calls specified callback when the script is unloaded.
- returns
Hook handler
unhook(handler)
Removes any hook registered above.
You can use pluginpref to easily store and retrieve settings.
set_pluginpref(name, value)
Stores settings in addon_SCRIPT_NAME.conf in the config dir.
- returns
- False: Failure
- True: Success
get_pluginpref(name)
This will return the value of the variable of that name. If there is none by this name it will return undefined.
- returns
String or Integer of stored setting or None if it does not exist.
Note
Strings of numbers are always returned as Integers.
del_pluginpref(name)
Deletes the specified variable.
- returns
- False: Failure
- True: Success (or never existing),
list_pluginpref()
Returns a list of all currently set preferences.