fix long callsign checking
authorminima <minima>
Sun, 27 Jan 2002 18:20:50 +0000 (18:20 +0000)
committerminima <minima>
Sun, 27 Jan 2002 18:20:50 +0000 (18:20 +0000)
Changes
perl/DXProt.pm
perl/Spot.pm

diff --git a/Changes b/Changes
index 486ba2c85b29a7305e74bc6739421d99cbfbac12..aeddc4f9ee166f34063c3085ccc0c7c02b113fbf 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@
 2. try to get the C client to handle closes on its standard input better
 3. put some validation in cluster.pl to check that people have set it up 
 handled.
+4. fix the long callsign checking
 22Jan02=======================================================================
 1. limit spot dupe checking to first 12 characters
 13Jan02=======================================================================
index d26795c406a3921c3387a2e6e08f87b4992ac6d2..2027239b6bac792fffec04499124181f3ff4aaea 100644 (file)
@@ -441,6 +441,12 @@ sub normal
                                        return;
                                }
                        }
+                       
+                       if (Spot::dup($field[1], $field[2], $d, $field[5])) {
+                               dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr');
+                               return;
+                       }
+
 
                        my @spot = Spot::prepare($field[1], $field[2], $d, $field[5], $field[6], $field[7]);
                        # global spot filtering on INPUT
@@ -451,11 +457,6 @@ sub normal
                                        return;
                                }
                        }
-                       
-                       if (Spot::dup($field[1], $field[2], $d, $field[5])) {
-                               dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr');
-                               return;
-                       }
 
                        # add it 
                        Spot::add(@spot);
index b5d560115dc5dd2f7b1502e436df399f83862d32..8e8f7fd06ea7f29941ea746d2359432540a836e1 100644 (file)
@@ -299,7 +299,7 @@ sub dup
        return 2 if $d < $main::systime - $dupage;
  
        $freq = sprintf "%.1f", $freq;       # normalise frequency
-       $call = substr($call, 12) if length $call > 12;
+       $call = substr($call, 0, 12) if length $call > 12;
        chomp $text;
        $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
        $text = substr($text, 0, $duplth) if length $text > $duplth;