From: Vincent Pit Date: Fri, 20 Nov 2015 14:43:23 +0000 (-0200) Subject: For AID/AGHOST, skip contextes not found X-Git-Url: http://git.vpit.fr/?p=perl%2Fscripts%2Fxchat.git;a=commitdiff_plain;h=338fdb0218fb3526190b88852b71aad90534d2a1 For AID/AGHOST, skip contextes not found --- diff --git a/services.pl b/services.pl index e9f13d6..0b7af6d 100755 --- a/services.pl +++ b/services.pl @@ -36,7 +36,7 @@ hook_command 'AID', sub { my @contexts = get_servers_ctxt; my $guard = save_context; for (@contexts) { - set_context $_; + set_context $_ or next; my $passwd = $forcepasswd || get_info 'nickserv'; next unless $passwd; command 'ID ' . $passwd; @@ -66,7 +66,7 @@ hook_command 'AGHOST', sub { my @contexts = get_servers_ctxt; my $guard = save_context; for (@contexts) { - set_context $_; + set_context $_ or next; my $passwd = $forcepasswd || get_info 'nickserv'; next unless $passwd; if (nickcmp(get_info('nick'), $target)) {