Merge branch 'newpc92timings' of /scm/spider into newpc92timings
[spider.git] / cmd / catchup.pl
index 53e4b18079a656709e3698923a72a39cdf3bf96d..81bf0539370d68384d332979308cd93290786838 100644 (file)
@@ -4,7 +4,7 @@
 # in other words mark all messages as being already received
 # by this node.
 #
-# $Id$
+#
 #
 # Copyright (c) 1999 Dirk Koopman G1TLH
 #
@@ -25,16 +25,22 @@ my @ref;
 
 # get a more or less valid set of messages
 foreach my $msgno (@f) {
-       if ($msgno =~ /^al/oi) {
+       if ($msgno =~ /^al/i) {
                @ref = DXMsg::get_all();
                last;
+       } elsif (my ($f, $t) = $msgno =~ /(\d+)-(\d+)/) {
+               while ($f <= $t) {
+                       $ref = DXMsg::get($f++);
+                       push @ref, $ref if $ref;
+               }
+       } else {
+               $ref = DXMsg::get($msgno);
+               unless ($ref) {
+                       push @out, $self->msg('m13', $msgno);
+                       next;
+               }
+               push @ref, $ref;
        }
-       $ref = DXMsg::get($msgno);
-       unless ($ref) {
-               push @out, $self->msg('m13', $msgno);
-               next;
-       }
-       push @ref, $ref;
 }
 
 foreach $ref (@ref) {