+04Jan22=======================================================================
+1. Fix issue in the RBN (and probably other places) with callsigns that
+ contain trailing / in callsigns like: OH0K/6, K2PO/7 etc.
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
sub basecall
{
- my ($r) = $_[0] =~ m|^(?:[\w\d]+/)?([\w\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;
return $ncall;
-
}
# remove all extraneous crap from the origin - just leave the base callsign
$origin = basecall($origin);
+ unless ($origin) {
+ dbg("RBN: ERROR '$origin' is an invalid callsign, dumped");
+ return;
+ }
# is this callsign in badspotter list?
if ($DXProt::badspotter->in($origin) || $DXProt::badnode->in($origin)) {
}
# is the qrg valid
- unless ($qrg =~ /^\d+\.\d{1,2}$/) {
+ unless ($qrg =~ /^\d+\.\d{1,3}$/) {
dbg("RBN: ERROR qrg $qrg from $origin invalid, dumped");
return;
}