use strict; use Irssi; use vars qw($VERSION %IRSSI); $VERSION = "1.0"; %IRSSI = ( authors => "Jilles Tjoelker", contact => "jilles\@stack.nl", name => "whoissource", description=> "Display source of \"End of WHOIS\" numerics", license => "Feel free to alter anything conform your own liking.", ); Irssi::theme_register([whoissource => ' [from] : $0']); sub event_endofwhois { my ($server, $args, $nick, $address) = @_; my @a = split(/ +/, $args); # >> :uk.darkwired.net 318 jilles jilles :End of /WHOIS list. if ($nick ne $server->{real_address}) { $server->printformat($a[1], MSGLEVEL_CRAP, 'whoissource', $nick); } } Irssi::signal_add_first('event 318', 'event_endofwhois');