Scripting
Documentation about scripting could be improved. In the mean time, the following resources might help.
Irssi Perl scripts
Scripting Tutorial, by Juerd
this (dated) resource contains a simple tutorial to making a “Hello, World!” script with a script header. Its style is not quite following Modern Perl, so it’s best combined with some modern Perl knowledge.
-
the most official Perl scripting documentation produced so far, it contains a short introduction to signals and a
/hello
command example. Furthermore, it aims to list all available functions as well as explain some of the object hash’ contents that one can use. -
signals are all of the events that happen in Irssi which one can react to, using the
Irssi::signal_add
family of functions. This list can help to discover the available signals and their parameters. Unfortunately, it’s sometimes still hard to know what signal one needs. (Unofficial) Irssi Scripting and Documentation Wiki
the unofficial wiki was an attempt to improve the (scripting) documentation. It was last updated in 2014 but might still contain some useful information (and maybe some outdated).
Furthermore, one could look at the existing scripts to see how they do things, but their quality may vary.
Irssi Python scripts
The Python module is supposed to be modeled after the Perl scripting, however it is also in low maintenance mode.
-
the most official Python documentation produced so far is this auto-generated module documentation.
Unlike Perl, Python might have embedded help:
/py exec import irssi;help(irssi.Window)
Irssi Tcl scripts
The (third party) Tcl module is not modeled after the Perl or Python
scripting. It only implements the send_text
and message public
signals and only a small subset of the other Irssi API. With a little
bit of C skills it could be extended to cover more Irssi signals.