X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=92a36d1ee826b192f8c699e247c33755a9e7b16a;hb=cd5b993f99b52d3c3c51779e9ea1fa150232225e;hp=289498ce27afdfdf1e9ff66cf3228f2c805784a1;hpb=f583c57eb08132eff72688c4615811647e8f82cb;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 289498ce..92a36d1e 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -65,7 +65,7 @@ $badnode = new DXHash "badnode"; $last10 = $last_pc50 = time; $ann_to_talk = 1; $eph_restime = 60; -$eph_info_restime = 60*60; +$eph_info_restime = 18*60*60; $eph_pc15_restime = 6*60; $eph_pc34_restime = 30; $pingint = 5*60; @@ -134,7 +134,7 @@ $pc92_find_timeout = 30; # maximum time to wait for a reply undef, undef, undef, # pc60 - undef, + [ qw(i f m d t m c c a h) ], # pc61 undef, undef, undef, @@ -205,6 +205,8 @@ sub check return $i unless $_[$i] =~ /^[012]\d[012345]\dZ$/; } elsif ($act eq 'l') { return $i unless $_[$i] =~ /^[A-Z]$/; + } elsif ($act eq 'a') { + return $i unless is_ipaddr($_[$i]); } } return 0; @@ -544,14 +546,22 @@ sub send_dx_spot my $line = shift; my @dxchan = DXChannel::get_all(); my $dxchan; + my $pc11; # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { next if $dxchan == $main::me; next if $dxchan == $self && $self->is_node; - next if $line =~ /PC61/ && !$dxchan->is_spider && !$dxchan->is_user; - $dxchan->dx_spot($line, $self->{isolate}, @_, $self->{call}); + if ($line =~ /PC61/ && !($dxchan->is_spider || $dxchan->is_user)) { + unless ($pc11) { + my @f = split /\^/, $line; + $pc11 = join '^', 'PC11', @f[1..7,9]; + } + $dxchan->dx_spot($pc11, $self->{isolate}, @_, $self->{call}); + } else { + $dxchan->dx_spot($line, $self->{isolate}, @_, $self->{call}); + } } }