Short irssi script for all server events
It took me a long time to understand the irssi documentation on how to write a Perl script and connect it to the signals (events) provided by the irssi modules.
Here's a minimal script that taps into the most basic signal, "server event". Hope it provides a working start for experimenting with the raw signals documentation (http://irssi.org/documentation/signals).
sub server_event {
my ($server, $data, $nick, $address) = @_;
print "$nick, $address, $data"
}
Irssi::signal_add("server event", "server_event");
Put this into ~/.irssi/scripts/minimal.pl and load with "/script run minimal".
Written by Tom, Bom
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors
janosgyerik
25.16K
Jean-Remy Duboc
12.25K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#