rather than a scary exception message about multiplication thrown by one
of the libraries that I use.
4. Added CTY-3126 prefixes.
+5. Silently ignore self spotting below 1240000Khz (change
+ $Spot::minselfspot to 0 to disable or some other freq in Khz). NOTE this
+ will appear as a spot to the spotter's feed, but will not be passed on.
15Jul21=======================================================================
1. Fix long standing bug in crontabs that commands with " rather than ' around
strings could cause those commands not to work.
my @out;
my $valid = 0;
my $localonly;
+my $oline = $line;
+
return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
return (1, $self->msg('e28')) unless $self->registered;
# check some other things
# remove ssid from calls
-my $callnoid = $self->call;
-$callnoid =~ s/-\d+$//;
-my $spotternoid = $spotter;
-$spotternoid =~ s/-\d+$//;
+my $spotternoid = basecall($spotter);
+my $callnoid = basecall($self->{call});
+
+#$DB::single = 1;
+
if ($DXProt::baddx->in($spotted)) {
$localonly++;
}
-if ($DXProt::badspotter->in($callnoid)) {
- LogDbg('DXCommand', "$self->{call} badspotter with $callnoid ($line)");
+if ($DXProt::badspotter->in($spotternoid)) {
+ LogDbg('DXCommand', "badspotter $spotternoid as $spotter ($oline)");
$localonly++;
}
-if ($callnoid ne $spotternoid && $DXProt::badspotter->in($spotternoid)) {
- LogDbg('DXCommand', "$self->{call} badspotter with $spotternoid ($line)");
- $localonly++;
+
+dbg "spotter $spotternoid/$callnoid\n";
+
+if (($spotted =~ /$spotternoid/ || $spotted =~ /$callnoid/) && $freq < $Spot::minselfspotqrg) {
+ LogDbg('DXCommand', "$spotternoid/$callnoid trying to self spot below ${Spot::minselfspotqrg}KHz ($oline), not passed on to cluster");
+ $localonly++;
}
# make line the rest of the line
print_all_fields cltounix unpad is_callsign is_latlong
is_qra is_freq is_digits is_pctext is_pcflag insertitem deleteitem
is_prefix dd is_ipaddr $pi $d2r $r2d localdata localdata_mv
- diffms _diffms _diffus difft parraydifft is_ztime
+ diffms _diffms _diffus difft parraydifft is_ztime basecall
);
$out =~ s/,\s*$//;
return $out;
}
+
+sub basecall
+{
+ $_[0] =~ m|^(?:[\w\d]+/)?([\w\d]+).*$|;
+ return $1;
+}
}
# remove all extraneous crap from the origin - just leave the base callsign
- $origin =~ s|^(?:[\w\d]+/)?([\w\d]+).*$|$1|;
+ $origin =~ basecall($origin);
# is this callsign in badspotter list?
if ($DXProt::badspotter->in($origin) || $DXProt::badnode->in($origin)) {
$use_db_for_search = 0;
our %spotcache; # the cache of data within the last $spotcachedays 0 or 2+ days
-our $spotcachedays = 2;
-
+our $spotcachedays = 2; # default 2 days worth
+our $minselfspotqrg = 1240000; # minimum freq above which self spotting is allowed
our $readback = 1;