From 910eef851a0aae8d0ebd30b5c8a4bd6fe32a14ef Mon Sep 17 00:00:00 2001 From: Alex Checca Date: Wed, 20 Jan 2016 20:51:15 -0500 Subject: removed ugly try catch --- scripts/xdcc_autoget.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/xdcc_autoget.pl b/scripts/xdcc_autoget.pl index ed5e206..fc1d7db 100644 --- a/scripts/xdcc_autoget.pl +++ b/scripts/xdcc_autoget.pl @@ -408,9 +408,7 @@ sub ag_opendcc #runs on DCC recieve init sub ag_skip { my($botcounter) = @_; - my @packlist = (); - try {my @packlist = @{$packs[$botcounter]};} #workaround for @{} being dumb if an array inside of an array is empty - catch {}; + my @packlist = @{$packs[$botcounter]//[]}; #if $packs[botcounter] is undefined, pass an empty array reference ag_remtimeouts($botcounter); #stop any other skips $reqpackflag[$botcounter] = 0; #allow pack requests now that transfer is finished if($episodicflag) -- cgit v1.2.3