From e5581689d790a1afd6ba0d83dc3bc36fc0e0f885 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 25 Oct 2000 21:01:53 +0000 Subject: [PATCH] fix catchup and uncatchup commands so that they accept ranges --- Changes | 2 ++ cmd/Commands_en.hlp | 14 ++++++++------ cmd/catchup.pl | 20 +++++++++++++------- cmd/uncatchup.pl | 18 ++++++++++++------ 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/Changes b/Changes index 1b2fd6da..5b2a78ec 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +25Oct00======================================================================= +1. fix catchup and uncatchup commands so that they accept ranges 24Oct00======================================================================= 1. added cty.dat from http://www.k1ea.com/cty/index.htm to the prefix_data.pl data file and modified create_prefix.pl accordingly. diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index d1d0f57d..2a781b11 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -32,8 +32,8 @@ DX cluster . This process creates a new 'client' process which will use the script in /spider/connect/ to effect the 'chat' exchange necessary to traverse the network(s) to logon to the cluster . -=== 9^CATCH All|[ ...]^Mark a message as sent -=== 9^UNCATCH All|[msgno> ...]^Unmark a message as sent +=== 9^CATCHUP All|[ ...]^Mark a message as sent +=== 9^UNCATCHUP All|[msgno> ...]^Unmark a message as sent When you send messages the fact that you have forwarded it to another node is remembered so that it isn't sent again. When you have a new partner node and you add their callsign to your /spider/msg/forward.pl file, all @@ -41,16 +41,18 @@ outstanding non-private messages will be forwarded to them. This may well be ALL the non-private messages. You can prevent this by using these commmands:- - catch GB7DJK all - catch GB7DJK 300 301 302 303 + catchup GB7DJK all + catchup GB7DJK 300 301 302 303 500-510 and to undo what you have just done:- - uncatch GB7DJK all - uncatch GB7DJK 300 301 302 303 + uncatchup GB7DJK all + uncatchup GB7DJK 300 301 302 303 500-510 which will arrange for them to be forward candidates again. +Order is not important. + === 0^DBAVAIL^Show a list of all the Databases in the system Title says it all really, this command lists all the databases defined in the system. It is also aliased to SHOW/COMMAND. diff --git a/cmd/catchup.pl b/cmd/catchup.pl index 53e4b180..e2f43904 100644 --- a/cmd/catchup.pl +++ b/cmd/catchup.pl @@ -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) { diff --git a/cmd/uncatchup.pl b/cmd/uncatchup.pl index 4f7808d7..40461071 100644 --- a/cmd/uncatchup.pl +++ b/cmd/uncatchup.pl @@ -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) { -- 2.43.0