X-Git-Url: http://git.vpit.fr/?p=perl%2Fscripts%2Fxchat.git;a=blobdiff_plain;f=opers.pl;fp=opers.pl;h=66c9c0b17974b39253a3c03c8b2e7c0e93eb39b5;hp=87a01c42d1b7c5e8bfa5e3d4b0b7ae011f9bda9c;hb=edd1cbfd1a969e16d8df9988eb448a53c97c02e7;hpb=dd329bf05f9a50bd10d79e522334761f9785d7ab diff --git a/opers.pl b/opers.pl index 87a01c4..66c9c0b 100755 --- a/opers.pl +++ b/opers.pl @@ -7,6 +7,7 @@ use Xchat qw<:all>; use lib get_info 'xchatdir'; use Xchat::XPI; +use Xchat::XPI::Utils qw; our $VERSION = '0.03'; @@ -27,7 +28,7 @@ hook_server '352', sub { push @{$chans{$_->{type}}}, $_ for grep $_->{server} eq $serv, get_list 'channels'; - my $oldctxt = get_context; + my $guard = save_context; my $onachan; for (@{$chans{2}}) { @@ -45,8 +46,6 @@ hook_server '352', sub { print_op $nick, $host; } - set_context $oldctxt; - return EAT_NONE; };