X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=inline;f=perl%2FDXProt.pm;h=4e32c22e77940e1eea3db025e85a55b08c0039ca;hb=aeb4c8591de710bd8de14f33817d2f0aabbd5e28;hp=010620a0f67725a5c8323d322a4b699a70787735;hpb=4769c7b97999c7df7f7c25f26d89902c2e86573b;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 010620a0..4e32c22e 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -241,7 +241,7 @@ sub new # old style connections, because we are about to get the real deal if (my $ref = Route::Node::get($call)) { dbg("ROUTE: $call is already in the routing table, deleting") if isdbg('route'); - my @rout = $ref->del_nodes; + my @rout = $ref->delete; $self->route_pc21($main::mycall, undef, @rout) if @rout; } $main::routeroot->add($call, '5000', Route::here(1)) if $call ne $main::mycall; @@ -371,12 +371,14 @@ sub normal } # modify the hop count here - if (my ($hops, $trail) = $line =~ /\^H(\d+)(\^?\~?)?$/) { - $trail ||= ''; - $hops--; - return if $hops < 0; - $line =~ s/\^H(\d+)(\^?\~?)?$/sprintf('^H%d%s', $hops, $trail)/e; - $field[-1] = "H$hops"; + if ($self != $main::me) { + if (my ($hops, $trail) = $line =~ /\^H(\d+)(\^?\~?)?$/) { + $trail ||= ''; + $hops--; + return if $hops < 0; + $line =~ s/\^H(\d+)(\^?\~?)?$/sprintf('^H%d%s', $hops, $trail)/e; + $field[-1] = "H$hops"; + } } # send it out for processing @@ -1157,8 +1159,11 @@ sub talk { my ($self, $from, $to, $via, $line, $origin) = @_; - $line =~ s/\^/\\5E/g; # remove any ^ characters - $self->send(DXProt::pc10($from, $to, $via, $line, $origin)); + if ($self->{do_pc93}) { + $self->send(pc93($to, $from, $via, $line)); + } else { + $self->send(pc10($from, $to, $via, $line, $origin)); + } Log('talk', $to, $from, $via?$via:$self->call, $line) unless $origin && $origin ne $main::mycall; }