X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fcatchup.pl;h=2bf0d5e7bee9dae0c361be32e3f639eeb00c4df2;hb=ab811a0c902225075a9bd69749f65594079433a9;hp=53e4b18079a656709e3698923a72a39cdf3bf96d;hpb=ece633d5cd8cbe2037b066987740701f8116d586;p=spider.git diff --git a/cmd/catchup.pl b/cmd/catchup.pl index 53e4b180..2bf0d5e7 100644 --- a/cmd/catchup.pl +++ b/cmd/catchup.pl @@ -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 all|[= 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; @@ -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) {