X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=354d6f5d4407ddb3a2ecf93c87c7366854e5ef8e;hb=729acdaa4d7ee8905ce76f6ab0ef6cd543c3bc49;hp=4b34975c2b00920d7811c8b9c6ac6c4b6a357fb9;hpb=24e7cdb8b2479635fc99952e007bfc6c4c7f6a9a;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 4b34975c..354d6f5d 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -239,11 +239,6 @@ sub new my $pkg = shift; my $call = shift; $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall; - if ($self->{call} ne $main::mycall) { - my $thing = Thingy::Hello->new(user=>$call); - $thing->broadcast($self); - } - return $self; } @@ -313,8 +308,10 @@ sub start $self->state('init'); $self->{pc50_t} = $main::systime; - my $thing = Thingy::Hello->new(origin=>$main::mycall, user=>$call); + # ALWAYS output the hello + my $thing = Thingy::Hello->new(user => $call, h => $self->{here}); $thing->broadcast($self); + $self->lasthello($main::systime); # send info to all logged in thingies $self->tell_login('loginn'); @@ -923,8 +920,8 @@ sub handle_18 # record the type and version offered if ($_[1] =~ /DXSpider Version: (\d+\.\d+) Build: (\d+\.\d+)/) { - $self->version(52.51 + $1); - $self->user->version(52.51 + $1); + $self->version(0 + $1); + $self->user->version(0 + $1); $self->build(0 + $2); $self->user->build(0 + $2); unless ($self->is_spider) { @@ -1049,7 +1046,7 @@ sub handle_19 my $flags = Route::here($here)|Route::conf($conf); # is he under the control of the new protocol? - if ($r->np) { + if ($r && $r->np) { dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr'); next; } @@ -1113,7 +1110,9 @@ sub handle_20 $self->{lastping} = 0; my $thing = Thingy::Rt->new(user=>$self->{call}); my $nref = Route::Node::get($self->{call}); - $thing->broadcast if $thing->copy_pc16_data($nref); + $thing->copy_pc16_data($nref); + $thing->broadcast; + $self->lastcf($main::systime); } @@ -1203,7 +1202,8 @@ sub handle_22 $self->{lastping} = 0; my $thing = Thingy::Rt->new(user=>$self->{call}); my $nref = Route::Node::get($self->{call}); - $thing->broadcast if $thing->copy_pc16_data($nref); + $thing->copy_pc16_data($nref); + $thing->broadcast; $self->lastcf($main::systime); }