X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=perl%2FDXProt.pm;h=a6587209179a8da21428e20a5176672265e8e61f;hb=cd86a5d3129e75ceef32b739f5a0cb5988ce7cd6;hp=e92ca8a1acbada27e04fac33e8e3c64dd105d24b;hpb=5b0cb88ef61ecda87a29033d8fc70edc617afc62;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index e92ca8a1..a6587209 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -179,6 +179,7 @@ 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; } # @@ -242,7 +243,7 @@ sub start $self->{lastping} = $main::systime + ($self->pingint / 2); } $self->state('init'); - $self->pc50_t(time); + $self->{pc50_t} = $main::systime; # send info to all logged in thingies $self->tell_login('loginn'); @@ -370,8 +371,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,9 +1131,9 @@ sub process next if $dxchan == $me; # send a pc50 out on this channel - if ($t >= $dxchan->pc50_t + $DXProt::pc50_interval) { + if ($t >= $dxchan->{pc50_t} + $DXProt::pc50_interval) { $dxchan->send(pc50(scalar DXChannel::get_all_users)); - $dxchan->pc50_t($t); + $dxchan->{pc50_t} = $t; } # send a ping out on this channel