mark calls like DR4W-HB as invalid
authorDirk Koopman <djk@tobit.co.uk>
Tue, 4 Jan 2022 20:10:03 +0000 (20:10 +0000)
committerDirk Koopman <djk@tobit.co.uk>
Tue, 4 Jan 2022 20:10:03 +0000 (20:10 +0000)
Changes
perl/DXUtil.pm
perl/RBN.pm

diff --git a/Changes b/Changes
index 091ca43a32dce903f013d648274f909ba9a31a61..7b5e4fff1b3747c5186827783e985b77802f1c39 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 04Jan22=======================================================================
 1. Fix issue in the RBN (and probably other places) with callsigns that
    contain trailing / in callsigns like: OH0K/6, K2PO/7 etc.
+2. Regard strange callsigns like DR4W-HB (seen in skimmer spots) as invalid. 
+   This *should be* something like HB9/DR4W or (spit) DR4W/HB9.
 03Jan22=======================================================================
 1. Allow overrides (on modern versions of perl) with things in DXVars.pm, such
    $clusterport. This is really only of use for people trying to run more than
index 7067c359d54892bbf7c935fc6fa67ecd43f107de..b8ff16d1b3ba50605316a2f645f85e9929e6d5a2 100644 (file)
@@ -599,13 +599,13 @@ sub parraydifft
 
 sub basecall
 {
-       my ($r) = $_[0] =~ m{^((?:[\w\d]+/)?[\w\d]+(?:/[\w\d]+)?)(?:-\d+)?(?:-\#)?$};
+       my ($r) = $_[0] =~ m{^((?:[\w\d]+/)?[\w\d]+(?:/[\w\d]+)*)(?:-\d+)?(?:-\#)?$};
        return $r;
 }
 
 sub normalise_call
 {
-       my ($c, $ssid) = $_[0] =~ m|^((?:[\w\d]+/)?[\d\w]+(?:/[\w\d]+)?)(?:-(\d+))?(?:-\#)?$|;
+       my ($c, $ssid) = $_[0] =~ m|^((?:[\w\d]+/)?[\d\w]+(?:/[\w\d]+)*)(?:-(\d+))?(?:-\#)?$|;
        my $ncall = $c;
        $ssid += 0;
        $ncall .= "-$ssid" if $ssid;
index 8e981fc2f908690db5f6cb539c0fa06fe07b3c7f..1fc50bd0e7d8af6d1aa5e7c4193198aa728aa3fd 100644 (file)
@@ -252,11 +252,12 @@ sub normal
        }
 
        # remove all extraneous crap from the origin - just leave the base callsign
-       $origin = basecall($origin);
-       unless ($origin) {
+       my $norigin = basecall($origin);
+       unless ($norigin) {
                dbg("RBN: ERROR '$origin' is an invalid callsign, dumped");
                return;
        }
+       $origin = $norigin;
 
        # is this callsign in badspotter list?
        if ($DXProt::badspotter->in($origin) || $DXProt::badnode->in($origin)) {