projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added baddx and badmsg functionality
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index ff891427079e0da82419badd01176534a9be815e..2feeda2d3d19282e1bb7ca5fa0d49b078fd6fe84 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-27,7
+27,9
@@
use Local;
use Carp;
use strict;
use Carp;
use strict;
-use vars qw($me $pc11_max_age $pc11_dup_age $pc23_dup_age %spotdup %wwvdup $last_hour %pings %rcmds %nodehops);
+use vars qw($me $pc11_max_age $pc11_dup_age $pc23_dup_age
+ %spotdup %wwvdup $last_hour %pings %rcmds
+ %nodehops @baddx $baddxfn);
$me = undef; # the channel id for this cluster
$pc11_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc11
$me = undef; # the channel id for this cluster
$pc11_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc11
@@
-39,7
+41,9
@@
$last_hour = time; # last time I did an hourly periodic update
%pings = (); # outstanding ping requests outbound
%rcmds = (); # outstanding rcmd requests outbound
%nodehops = (); # node specific hop control
%pings = (); # outstanding ping requests outbound
%rcmds = (); # outstanding rcmd requests outbound
%nodehops = (); # node specific hop control
+@baddx = (); # list of illegal spotted callsigns
+$baddxfn = "$main::data/baddx.pl";
sub init
{
sub init
{
@@
-69,6
+73,9
@@
sub init
$wwvdup{$dupkey} = $_->[1];
}
$wwvdup{$dupkey} = $_->[1];
}
+ # load the baddx file
+ do "$baddxfn" if -e "$baddxfn";
+ print "$@\n" if $@;
}
#
}
#
@@
-189,6
+196,12
@@
sub normal
}
$spotdup{$dupkey} = $d;
}
$spotdup{$dupkey} = $d;
+
+ # is it 'baddx'
+ if (grep $field[2] eq $_, @baddx) {
+ dbg('chan', "Bad DX spot, ignored");
+ return;
+ }
my $spot = Spot::add($freq, $field[2], $d, $text, $spotter, $field[7]);
my $spot = Spot::add($freq, $field[2], $d, $text, $spotter, $field[7]);