X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=tools.pl;h=f7e5c4efc4c25ff7da85a1501cfbe568f9bb5dd8;hb=7e00cc69db0ee7a4379b5378f1673efc4b531ae8;hp=b554d4a7fc16ab636beb86b5563e76b1caac0017;hpb=b9c3e00cbf52ff5ddb0d79fd66a6877f6feb508d;p=perl%2Fscripts%2Fxchat.git diff --git a/tools.pl b/tools.pl index b554d4a..f7e5c4e 100755 --- a/tools.pl +++ b/tools.pl @@ -4,12 +4,13 @@ use strict; use warnings; use Data::Dumper; -use Encode qw/encode/; +use Encode qw; -use Xchat qw/:all/; +use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; +use Xchat::XPI::Utils qw; use constant MAX_MATCHES => 10; @@ -23,12 +24,11 @@ BEGIN { } hook_command 'TC', sub { - my $oldctxt = get_context; + my $guard = save_context; for (get_list 'channels') { set_context $_->{context}; command 'GUI COLOR 0'; } - set_context $oldctxt; return EAT_ALL; }, { help_text => 'TC, reset all tab color indicators'