X-Git-Url: http://git.vpit.fr/?p=perl%2Fscripts%2Fxchat.git;a=blobdiff_plain;f=hl.pl;h=ce53996a0d76f09eee1ff40c8d6b0221dbd2a501;hp=c2f32b9f68deb62b11e0db03a44d2098ca52605e;hb=ffe36ae4fd26ac981a28f5e776d8424f1d56da2a;hpb=263b6777b90548951a13bd56419fa911b010eb9b diff --git a/hl.pl b/hl.pl index c2f32b9..ce53996 100755 --- a/hl.pl +++ b/hl.pl @@ -20,18 +20,38 @@ sub guihl { hook_print 'Private Message to Dialog', sub { guihl; return EAT_NONE }; -my %words = ( - '#cpantesters' => [ qw/Linux-SysInfo MorseSignals Regexp-Wildcards Scalar-Vec-Util Sub-Prototype-Util Test-Valgrind Variable-Magic with- B-RecDeparse Sub-Nary indirect- subs-auto/ ] +my %hl = ( + '#cpantesters' => [ qw/ + Acme-CPANAuthors-You-re_using + B-RecDeparse + CPANPLUS-Dist-Gentoo + Lexical-Types + Linux-SysInfo + MorseSignals + Perl-Critic-Policy-Dynamic-NoIndirect + Regexp-Wildcards + Scalar-Vec-Util + Scope-Upper + Sub-Nary + Sub-Prototype-Util + Test-Valgrind + Thread-Cleanup + Variable-Magic + indirect- + rgit- + subs-auto + with- + / ], ); -for (keys %words) { - my $rx = '(?:' . (join '|', @{$words{$_}}) . ')'; - $words{$_} = qr/$rx/; +for (keys %hl) { + my $rx = '(?:' . join('|', @{$hl{$_}}) . ')'; + $hl{$_} = qr/$rx/; } filter 'Channel Action' => sub { my $chan = lc get_info 'channel'; - if ($words{$chan} and $_[1] =~ /$words{$chan}/) { + if ($hl{$chan} and $_[1] =~ /$hl{$chan}/) { guihl; 1; } else {