use strict; use Irssi; use vars qw($VERSION %IRSSI); $VERSION = "1.0"; %IRSSI = ( authors => "Jilles Tjoelker", contact => "jilles\@stack.nl", name => "whoisactually", description=> "Display \"actually using host\" properly on ratbox and other servers", license => "Feel free to alter anything conform your own liking.", ); # from: # authors=> "Chris \'raz\' Hoogenboezem", # contact=> "chrish\@carrier6.com", # name=> "accountname", Irssi::theme_register([actualhost => ' actual ip: $0']); sub event_actualhost { my @a = split(/ +/, $_[1]); # :jaguar.test 338 jilles jilles 0::1 :actually using host $a[2] =~ s/^0:/:/; $_[0]->printformat($a[1], MSGLEVEL_CRAP, 'actualhost', $a[2]); Irssi::signal_stop(); } Irssi::signal_add('event 338', 'event_actualhost');