can use Sourceforge now!
authorminima <minima>
Thu, 20 Jul 2000 14:16:00 +0000 (14:16 +0000)
committerminima <minima>
Thu, 20 Jul 2000 14:16:00 +0000 (14:16 +0000)
added user->qra cleaning
added 4 digit qra to user broadcast dxspots if available

Changes
perl/DXCommandmode.pm
perl/DXProt.pm
perl/Geomag.pm
perl/Spot.pm
perl/WCY.pm
src/chain.c
src/cmsg.c
src/cmsg.h
src/sel.c
src/sel.h

diff --git a/Changes b/Changes
index de0cdb9bd3dc3fa907f75d7dd5ec519a1dea16e0..4a880f0aaf5cbc37bd7e42dd27f5ce1816dac29b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,12 @@
-20Jun00=======================================================================
-1. fixed decode_input so it accepts callsigns with 0 in them (!)
+20Jul00=======================================================================
+1. Finally managed to update my source with the sourceforge one
+2. added user->qra cleaning in various places
+3. added four digit locator strings to broadcast DX spots (for users).
+25Jun00=======================================================================
+1. added 0 to the regex that checks for valid data on the cluster.pl->client
+channel - this will allow G0VGS and G0RDI to connect....
+2. removed technically unnecessary /= 60 from the dup routines to see if 
+Arnold's Sparcs don't then crash.
 19Jun00=======================================================================
 1. move ann_dup, spot_dup etc to dup_ann, dup_spots etc
 2. made mode 3 the default line ending convention for all out going connects
index ca6a1c4e989cbc264c4b72cf698a6197bf7a6c93..d88d879ee9678d7209a89c546bb3375cd6e85858 100644 (file)
@@ -80,7 +80,15 @@ sub start
        $self->{dx} = $user->wantdx;
        $self->{logininfo} = $user->wantlogininfo;
        $self->{here} = 1;
-       
+
+       # clean up qra locators
+       my $qra = $user->qra;
+       $qra = undef if ($qra && !DXBearing::is_qra($qra));
+       unless ($qra) {
+               my $lat = $user->lat;
+               my $long = $user->long;
+               $user->qra(DXBearing::lltoqra($lat, $long)) if (defined $lat && defined $long);  
+       }
 
        # add yourself to the database
        my $node = DXNode->get($main::mycall) or die "$main::mycall not allocated in DXNode database";
index a7cf9e6f9d96952db58fd4b9c4b41f493f51833f..0a1c83ddbce0278dbac19abfa5fc76d4678096c0 100644 (file)
@@ -222,8 +222,8 @@ sub normal
                        }
 
                        # are any of the crucial fields invalid?
-            if ($field[2] =~ /[a-z]/ || $field[6] =~ /[a-z]/ || $field[7] =~ /[a-z]/) {
-                               dbg('chan', "Spot contains lower case callsigns, rejected");
+            if ($field[2] =~ /(?:^\s*$|[a-z])/ || $field[6] =~ /(?:^\s*$|[a-z])/ || $field[7] =~ /(?:^\s*$|[a-z])/) {
+                               dbg('chan', "Spot contains lower case callsigns or blanks, rejected");
                                return;
                        }
                        
@@ -243,6 +243,20 @@ sub normal
                        # you should be able to route on any of these
             #
                        
+                       # fix up qra locators of known users 
+                       my $user = DXUser->get_current($spot[4]);
+                       if ($user) {
+                               my $qra = $user->qra;
+                               if (!DXBearing::is_qra) {
+                                       my $lat = $user->lat;
+                                       my $long = $user->long;
+                                       if (defined $lat && defined $long) {
+                                               $user->qra(DXBearing::lltoqra($lat, $long)); 
+                                               $user->put;
+                                       }
+                               }
+                       }
+                               
                        # local processing 
                        my $r;
                        eval {
@@ -654,6 +668,8 @@ sub normal
                                my ($lat, $long) = DXBearing::stoll($field[3]);
                                $user->lat($lat);
                                $user->long($long);
+                               my $qra = $user->qra || DXBearing::lltoqra($lat, $long);
+                               $qra = DXBearing::lltoqra($lat, $long) unless DXBearing::is_qra($qra);
                        } elsif ($field[2] == 4) {
                                $user->homenode($field[3]);
                        }
index 1d3462dc408cf35dc33b5dcb9d0a2a0fdd41b77c..d169565aff0cada8fe0691d8abdc537d45d21518 100644 (file)
@@ -252,7 +252,6 @@ sub dup
        # dump if too old
        return 2 if $d < $main::systime - $dupage;
  
-       $d /= 60;                            # to the nearest minute
 #      chomp $text;
 #      $text = substr($text, 0, $duplth) if length $text > $duplth; 
        my $dupkey = "$d|$sfi|$k|$a";
index afc3410fb6e04045bdf7c774e766c6822a80f190..fcf2d261a154f9c2e74b37e168183b5039079431 100644 (file)
@@ -170,7 +170,11 @@ sub formatb
 {
        my @dx = @_;
        my $t = ztime($dx[2]);
-       return sprintf "DX de %-7.7s%11.1f  %-12.12s %-30s %s", "$dx[4]:", $dx[0], $dx[1], $dx[3], $t ;
+       my $ref = DXUser->get_current($dx[4]);
+       my $loc = $ref->qra if $ref && $ref->qra;
+       $loc = substr($ref->qra, 0, 4) if $loc;
+       $loc = "" unless $loc;
+       return sprintf "DX de %-7.7s%11.1f  %-12.12s %-30s %s $loc", "$dx[4]:", $dx[0], $dx[1], $dx[3], $t ;
 }
 
 # format a spot for user output in list mode
@@ -209,9 +213,9 @@ sub dup
        return 2 if $d < $main::systime - $dupage;
  
        $freq = sprintf "%.1f", $freq;       # normalise frequency
-       $d /= 60;                            # to the nearest minute
        chomp $text;
        $text = substr($text, 0, $duplth) if length $text > $duplth; 
+       unpad($text);
        my $dupkey = "$freq|$call|$d|$text";
        return 1 if exists $dup{$dupkey};
        $dup{$dupkey} = $d * 60;         # in seconds (to the nearest minute)
index acc522bd5a76f0abbd873c9828cf72ed488f9e6c..ef1a9b21f523ed8a357ca930dabf6f8f4c68985a 100644 (file)
@@ -227,7 +227,6 @@ sub dup
        # dump if too old
        return 2 if $d < $main::systime - $dupage;
  
-       $d /= 60;                            # to the nearest minute
 #      chomp $text;
 #      $text = substr($text, 0, $duplth) if length $text > $duplth; 
        my $dupkey = "$d|$sfi|$k|$a|$r";
index 89110a959c7644e378f27d0000f4a15b785773df..cc66773adf951bb75230053ecb48308e743f34ce 100755 (executable)
@@ -185,7 +185,12 @@ reft *chain_new()
 
 /*
  * $Log$
- * Revision 1.3  2000-03-30 22:51:14  djk
+ * Revision 1.4  2000-07-20 14:16:00  minima
+ * can use Sourceforge now!
+ * added user->qra cleaning
+ * added 4 digit qra to user broadcast dxspots if available
+ *
+ * Revision 1.3  2000/03/30 22:51:14  djk
  * fixed connect code in client.pl so it doesn't falsely recognise /spider
  * /src/client as a 'client' directive.
  * Tidied up the C client a bit
index 1b325b5860803cd731e16a8de6e345a99ab0e2b2..8732f19bc422577ed6ef87ac7f9bc8b96b1e1800 100755 (executable)
@@ -177,7 +177,12 @@ void cmsg_flush(reft *base, int reply)
 /*
  * 
  * $Log$
- * Revision 1.1  2000-03-26 00:03:30  djk
+ * Revision 1.2  2000-07-20 14:16:00  minima
+ * can use Sourceforge now!
+ * added user->qra cleaning
+ * added 4 digit qra to user broadcast dxspots if available
+ *
+ * Revision 1.1  2000/03/26 00:03:30  djk
  * first cut of client
  *
  * Revision 1.12  1998/05/05 14:01:27  djk
index 384b90f717a88225836ae5d2f0fd744c8472be69..99f6d4ad4a31a8ef1c7f171fbc653ebd635203be 100755 (executable)
@@ -8,7 +8,12 @@
  * $Header$
  * 
  * $Log$
- * Revision 1.1  2000-03-26 00:03:30  djk
+ * Revision 1.2  2000-07-20 14:16:00  minima
+ * can use Sourceforge now!
+ * added user->qra cleaning
+ * added 4 digit qra to user broadcast dxspots if available
+ *
+ * Revision 1.1  2000/03/26 00:03:30  djk
  * first cut of client
  *
  * Revision 1.7  1998/01/02 19:39:57  djk
index a15ed0ec1b1a5695c03ebcbddf5454941dcc056c..4856dda33e068f46479d10f2f3ec62c219594341 100755 (executable)
--- a/src/sel.c
+++ b/src/sel.c
@@ -188,7 +188,12 @@ int sel_error(sel_t *sp, int err)
 
 /*
  * $Log$
- * Revision 1.3  2000-03-30 22:51:14  djk
+ * Revision 1.4  2000-07-20 14:16:00  minima
+ * can use Sourceforge now!
+ * added user->qra cleaning
+ * added 4 digit qra to user broadcast dxspots if available
+ *
+ * Revision 1.3  2000/03/30 22:51:14  djk
  * fixed connect code in client.pl so it doesn't falsely recognise /spider
  * /src/client as a 'client' directive.
  * Tidied up the C client a bit
index 5fd3f3eed15baad2ed3f8b0dda56c7fb1d6ba208..dde95a42fd5374d1b2b595cb5cd2302e0a3a0fa5 100755 (executable)
--- a/src/sel.h
+++ b/src/sel.h
@@ -8,7 +8,12 @@
  * $Header$
  * 
  * $Log$
- * Revision 1.2  2000-03-26 14:22:59  djk
+ * Revision 1.3  2000-07-20 14:16:00  minima
+ * can use Sourceforge now!
+ * added user->qra cleaning
+ * added 4 digit qra to user broadcast dxspots if available
+ *
+ * Revision 1.2  2000/03/26 14:22:59  djk
  * removed some irrelevant log info
  *
  * Revision 1.1  2000/03/26 00:03:30  djk