X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXProt.pm;h=decd71f674452ea072172baab71a60b280d34f70;hb=fdc49835d7dc5573453567bd41e52c5e580ad8e7;hp=ef3f331707180c754807f085411992367b1b267c;hpb=2a37fdae7b5154d77fe602bf18d6fa908e634748;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index ef3f3317..decd71f6 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -31,6 +31,7 @@ use WCY; use Time::HiRes qw(gettimeofday tv_interval); use BadWords; use DXHash; +use Route::Node; use strict; use vars qw($me $pc11_max_age $pc23_max_age @@ -179,6 +180,8 @@ sub init do "$main::data/hop_table.pl" if -e "$main::data/hop_table.pl"; confess $@ if $@; $me->{sort} = 'S'; # S for spider + $me->{priv} = 9; + $Route::Node::me->adddxchan($me); } # @@ -370,8 +373,19 @@ sub normal return; } } + + my @spot = Spot::prepare($field[1], $field[2], $d, $field[5], $field[6], $field[7]); + # global spot filtering on INPUT + if ($self->{inspotsfilter}) { + my ($filter, $hops) = $self->{inspotsfilter}->it(@spot); + unless ($filter) { + dbg('chan', "PCPROT: Rejected by filter"); + return; + } + } - my @spot = Spot::add($field[1], $field[2], $d, $field[5], $field[6], $field[7]); + # add it + Spot::add(@spot); # # @spot at this point contains:- @@ -1119,6 +1133,7 @@ sub process next if $dxchan == $me; # send a pc50 out on this channel + $dxchan->{pc50_t} = $main::systime unless exists $dxchan->{pc50_t}; if ($t >= $dxchan->{pc50_t} + $DXProt::pc50_interval) { $dxchan->send(pc50(scalar DXChannel::get_all_users)); $dxchan->{pc50_t} = $t;