fix catchup and uncatchup commands so that they accept ranges
authorminima <minima>
Wed, 25 Oct 2000 21:01:53 +0000 (21:01 +0000)
committerminima <minima>
Wed, 25 Oct 2000 21:01:53 +0000 (21:01 +0000)
Changes
cmd/Commands_en.hlp
cmd/catchup.pl
cmd/uncatchup.pl

diff --git a/Changes b/Changes
index 1b2fd6dafe9d4ed62dc69d961abd0ae913c9614c..5b2a78ece9eff4a31f56f13996d34cc9cf5bf117 100644 (file)
--- 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.
index d1d0f57d79990fe29c482afc3cbf0aae16423af7..2a781b1179d78ba4ab7ac8e9da81dd3c36298a2a 100644 (file)
@@ -32,8 +32,8 @@ DX cluster <callsign>. This process creates a new 'client' process which will
 use the script in /spider/connect/<callsign> to effect the 'chat' exchange
 necessary to traverse the network(s) to logon to the cluster <callsign>.
 
-=== 9^CATCH <node call> All|[<msgno> ...]^Mark a message as sent
-=== 9^UNCATCH <node call> All|[msgno> ...]^Unmark a message as sent
+=== 9^CATCHUP <node call> All|[<msgno> ...]^Mark a message as sent
+=== 9^UNCATCHUP <node call> 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.
index 53e4b18079a656709e3698923a72a39cdf3bf96d..e2f439040921652d9198cf7f719a93e51c55a7cf 100644 (file)
@@ -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) {
index 4f7808d728f322f957e732af3ef24d1ba39f2643..4046107141c2e6a6e225eb9be7f0fbb341972d7e 100644 (file)
@@ -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) {