From: Vincent Pit Date: Thu, 30 Jul 2009 09:34:53 +0000 (+0200) Subject: Rename %words to %hl X-Git-Url: http://git.vpit.fr/?p=perl%2Fscripts%2Fxchat.git;a=commitdiff_plain;h=ffe36ae4fd26ac981a28f5e776d8424f1d56da2a Rename %words to %hl --- diff --git a/hl.pl b/hl.pl index 1af2f58..ce53996 100755 --- a/hl.pl +++ b/hl.pl @@ -20,7 +20,7 @@ sub guihl { hook_print 'Private Message to Dialog', sub { guihl; return EAT_NONE }; -my %words = ( +my %hl = ( '#cpantesters' => [ qw/ Acme-CPANAuthors-You-re_using B-RecDeparse @@ -44,14 +44,14 @@ my %words = ( / ], ); -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 {