X-Git-Url: http://git.vpit.fr/?p=perl%2Fscripts%2Fxchat.git;a=blobdiff_plain;f=hl.pl;fp=hl.pl;h=0a9fa11984c0ea16ce1e882daef191c1b7463de0;hp=7e76ba2c6cfb0e654a0a4aff635c8fca84e9e6d3;hb=532ed2d6f4e5597f1dd76e71f2bd9880c5d779bb;hpb=7e00cc69db0ee7a4379b5378f1673efc4b531ae8 diff --git a/hl.pl b/hl.pl index 7e76ba2..0a9fa11 100755 --- a/hl.pl +++ b/hl.pl @@ -8,21 +8,16 @@ use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; use Xchat::XPI::Events qw; +use Xchat::XPI::Utils qw; our $VERSION = '0.04'; my $ph; -sub guihl { - command 'GUI FLASH'; - command 'GUI COLOR 3'; -} - -sub guiclear { - command 'GUI COLOR 0'; -} - -hook_print 'Private Message to Dialog', sub { guihl; return EAT_NONE }; +hook_print 'Private Message to Dialog', sub { + gui 'highlight'; + return EAT_NONE; +}; my %hl = ( '#cpantesters' => [ qw< @@ -59,7 +54,7 @@ for (keys %hl) { filter 'Channel Action' => sub { my $chan = lc get_info 'channel'; if ($hl{$chan} and $_[1] =~ /$hl{$chan}/) { - guihl; + gui 'highlight'; 1; } else { 0; @@ -80,7 +75,7 @@ for (keys %skip) { filter 'Channel Action Hilight' => sub { my $chan = lc get_info 'channel'; if ($skip{$chan} and $_[1] =~ /$skip{$chan}/) { - guiclear; + gui 'clear'; 1; } else { 0;