X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FRBN.pm;h=ec9f39467942ef2014557938a393f44482068164;hb=deb52e701a0db351d06eb6fe14872dc2fa7a51cb;hp=8c2fbaadc5911079367118faac7a1c71ac4987e6;hpb=2ca690592ea14e2ecd6783feed99ed7a8195162c;p=spider.git diff --git a/perl/RBN.pm b/perl/RBN.pm index 8c2fbaad..ec9f3946 100644 --- a/perl/RBN.pm +++ b/perl/RBN.pm @@ -251,8 +251,25 @@ sub normal return; } - $origin =~ s/\-(?:\d{1,2}\-)?\#$//; # get rid of all the crap we aren't interested in + # remove all extraneous crap from the origin - just leave the base callsign + 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)) { + dbg("RBN: ERROR $origin is a bad spotter/node, dumped"); + return; + } + + # is the qrg valid + unless ($qrg =~ /^\d+\.\d{1,3}$/) { + dbg("RBN: ERROR qrg $qrg from $origin invalid, dumped"); + return; + } $sort ||= ''; $tx ||= ''; @@ -523,8 +540,9 @@ sub dx_spot unless ($user->qra && is_qra($user->qra)) { $user->qra($qra); dbg("RBN: update qra on $saver->[SCall] to $qra"); - $user->put; } + # update lastseen if nothing else + $user->put; } } }