X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Funcatchup.pl;h=fb54f7e25e64a4148ee87080e7d1b83ae0483a9c;hb=613301f150d03d194b6c64542d4809c74b1986c6;hp=2c750b5eefdcc4e0a03f6d3b6b7894becc7611d6;hpb=3eb722692c2c1e9de84752391d5b6330e062c7e6;p=spider.git diff --git a/cmd/uncatchup.pl b/cmd/uncatchup.pl index 2c750b5e..fb54f7e2 100644 --- a/cmd/uncatchup.pl +++ b/cmd/uncatchup.pl @@ -10,7 +10,7 @@ # my ($self, $line) = @_; -return (1, $self->msg('e5')) if $self->priv < 9; +return (1, $self->msg('e5')) if $self->priv < 5; my @f = split /\s+/, $line; return (1, "usage: catchup all|[= 2; @@ -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) {