X-Git-Url: http://git.vpit.fr/?p=perl%2Fscripts%2Fxchat.git;a=blobdiff_plain;f=tools.pl;fp=tools.pl;h=f7e5c4efc4c25ff7da85a1501cfbe568f9bb5dd8;hp=b06f166d614b31cb12d53410dc245cb41e790a85;hb=edd1cbfd1a969e16d8df9988eb448a53c97c02e7;hpb=dd329bf05f9a50bd10d79e522334761f9785d7ab diff --git a/tools.pl b/tools.pl index b06f166..f7e5c4e 100755 --- a/tools.pl +++ b/tools.pl @@ -10,6 +10,7 @@ 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'