use Irssi; use strict; use vars qw($VERSION %IRSSI); $VERSION = '1.00'; %IRSSI = ( authors => 'Eric Jansen', contact => 'chaos@sorcery.net', name => 'whoisfix', description => 'Fixes ugly masked-as line in whois reply on SorceryNet', license => 'GPL', modules => '', changed => 'Sun Feb 16 13:47:02 CET 2003' ); sub event_whoismasked { my ($server, $data, $nick, $host) = @_; if($data =~ /^[^\s]+ ([^\s]+) :is masked as ([^\s]+)$/) { $server->printformat($1, MSGLEVEL_CRAP, 'whois_masked', $2); Irssi::signal_stop(); } } Irssi::theme_register([ 'whois_masked', '{whois %|masked as $0}' ]); Irssi::signal_add('event 550', 'event_whoismasked');