X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=9d92a8293099060c42bc16cd936b69b4eb358153;hb=c8b7744ab5cbdada26c56635b20c8d9715104153;hp=846a6c9245f3d0cdc45f8c3f08ea9e0a6e8e97ee;hpb=9f7e2a3ed64a53dbb0bf2e44bcd463bceef6c45b;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 846a6c92..9d92a829 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -254,15 +254,14 @@ sub start $self->{pingint} = $ping; $self->{nopings} = $user->nopings || 2; $self->{pingtime} = [ ]; - $self->{pingave} = 0; + $self->{pingave} = 999; + $self->{lastping} = $main::systime; # send initialisation string unless ($self->{outbound}) { $self->send(pc18()); - $self->{lastping} = $main::systime; - } else { - $self->{lastping} = $main::systime + ($self->pingint / 2); } + $self->state('init'); $self->{pc50_t} = $main::systime; @@ -753,6 +752,7 @@ sub normal $self->send_local_config(); $self->send(pc22()); $self->state('normal'); + $self->{lastping} = 0; return; } @@ -798,6 +798,7 @@ sub normal if ($pcno == 22) { $self->state('normal'); + $self->{lastping} = 0; return; } @@ -1827,13 +1828,11 @@ sub broadcast_route my $dxchan; my $line; - foreach $dxchan (@dxchan) { - next if $dxchan == $self; - next if $dxchan == $me; - if ($dxchan->{routefilter}) { + unless ($self->{isolate}) { + foreach $dxchan (@dxchan) { + next if $dxchan == $self; + next if $dxchan == $me; $dxchan->send_route($generate, @_); - } else { - $dxchan->send_route($generate, @_) unless $self->{isolate}; } } }