Change DXUser->get* to DXUser::get*
[spider.git] / cmd / uncatchup.pl
index 4f7808d728f322f957e732af3ef24d1ba39f2643..8a6f02a680eda9bfa1aa3d488528e1e3c001ccd8 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
 #
@@ -16,7 +16,7 @@ my @f = split /\s+/, $line;
 return (1, "usage: catchup <node call> all|[<msgno ...]") unless @f >= 2;
 
 my $call = uc shift @f;
-my $user = DXUser->get_current($call);
+my $user = DXUser::get_current($call);
 return (1, "$call not a node") unless $user && $user->sort ne 'U';
 
 my @out;
@@ -28,13 +28,19 @@ foreach my $msgno (@f) {
        if ($msgno =~ /^al/oi) {
                @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) {