]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
bugfix downloading previously downloaded file
authorAlex Checca <redacted>
Tue, 9 Feb 2016 06:27:46 +0000 (01:27 -0500)
committerAlex Checca <redacted>
Tue, 9 Feb 2016 06:27:46 +0000 (01:27 -0500)
scripts/xdcc_autoget.pl

index fc1d7db7489faf53308b5f950ed0816fa74959b2..16f4639f2de96491ea09b502bd7975c74dda2e86 100644 (file)
@@ -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;
 }
 
 
git clone https://git.99rst.org/PROJECT