From: Dirk Koopman Date: Tue, 4 Jan 2022 20:10:03 +0000 (+0000) Subject: mark calls like DR4W-HB as invalid X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=78fcd88c563bc8f05c9f590cdfc0739129c7efda;p=spider.git mark calls like DR4W-HB as invalid --- diff --git a/Changes b/Changes index 091ca43a..7b5e4fff 100644 --- 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 diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm index 7067c359..b8ff16d1 100644 --- a/perl/DXUtil.pm +++ b/perl/DXUtil.pm @@ -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; diff --git a/perl/RBN.pm b/perl/RBN.pm index 8e981fc2..1fc50bd0 100644 --- a/perl/RBN.pm +++ b/perl/RBN.pm @@ -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)) {