summaryrefslogtreecommitdiffstats
path: root/scripts/xdcc_autoget.pl
diff options
context:
space:
mode:
authorAlex Checca2016-02-09 01:27:46 -0500
committerAlex Checca2016-02-09 01:27:46 -0500
commitf95f1f50fb882e264d9c04b53376f83cba94ccf1 (patch)
tree4c5de4b648d54dc0a8dc4e012a8c30447f99b673 /scripts/xdcc_autoget.pl
parent910eef851a0aae8d0ebd30b5c8a4bd6fe32a14ef (diff)
downloadscripts.irssi.org-f95f1f50fb882e264d9c04b53376f83cba94ccf1.tar.bz2
bugfix downloading previously downloaded file
Diffstat (limited to 'scripts/xdcc_autoget.pl')
-rw-r--r--scripts/xdcc_autoget.pl8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/xdcc_autoget.pl b/scripts/xdcc_autoget.pl
index fc1d7db..16f4639 100644
--- a/scripts/xdcc_autoget.pl
+++ b/scripts/xdcc_autoget.pl
@@ -439,7 +439,6 @@ sub ag_skip
$termcounter[$botcounter] = 0;
$packcounter[$botcounter] = 0;
push(@{$totags[$botcounter]}, Irssi::timeout_add_once($exedelay * 1000 * 60, sub { ag_search($botcounter); } , []));
- $runningflag = 0;
}
}
elsif ($packcounter[$botcounter] < $#packlist)
@@ -461,7 +460,6 @@ sub ag_skip
$termcounter[$botcounter] = 0;
$packcounter[$botcounter] = 0;
push(@{$totags[$botcounter]}, Irssi::timeout_add_once($exedelay * 1000 * 60, sub { ag_search($botcounter); } , []));
- $runningflag = 0;
}
}
@@ -490,7 +488,7 @@ sub ag_closedcc
{
$filename =~ tr/[ ']/[__]/;
@filenames = grep { $_ ne $filename } @filenames; #remove the file from the list of files being transferred
- }
+ }
ag_remtimeouts($botcounter);
if ($dcc->{'skipped'} == $dcc->{'size'})
@@ -540,7 +538,6 @@ sub ag_closedcc
$termcounter[$botcounter] = 0;
$packcounter[$botcounter] = 0;
Irssi::timeout_add_once($exedelay * 1000 * 60, sub { ag_search($temp); } , []);
- $runningflag = 0;
}
}
}
@@ -579,7 +576,8 @@ sub ag_addfinished #save finished downloads
print FINISHED $bots[$botcounter] . " " . $packs[$botcounter][$packcounter[$botcounter]] . "\n"; #print pack to file
$filename =~ tr/[ ']/[__]/;
print FINISHED $filename . "\n"; #print name to file
- close(FINISHED);
+ close(FINISHED);
+ ag_getfinished;
}