} else {
# send orf to the users
$ipaddr ||= $main::mycall; # emergency backstop
- my $spot = DXProt::pc61($spotter, $freq, $spotted, $line, $ipaddr);
+ my $spot = DXProt::pc61($spotter, $freq, $spotted, unpad($line), $ipaddr);
$self->dx_spot(undef, undef, @spot);
if ($self->isslugged) {
my $ip;
my $version = $part[1] || 0;
my $build = $part[2] || 0;
- $build =~ s/\D+//g;
my $ip = $part[3] || '';
if ($version =~ /[,.]/) {
$version =~ s/\D+//g;
$build =~ s/^0\.//;
$build =~ s/\D+//g;
- $ip =~ s/,/:/g if $ip;
- return ($call, $is_node, $is_extnode, $here, $version, $build, $ip);
+ if ($ip) {
+ $ip =~ s/,/:/g;
+ $ip =~ s/^::ffff://i;
+ }
+ dbg("$icall = '" . join("', '", $call, $is_node, $is_extnode, $here, $version, $build, $ip) . "'") if isdbg('pc92');
+
+ return ($call, $is_node, $is_extnode, $here, $version+0, $build+0, $ip);
}
# decode a pc92 call: flag call : version : build
$ip =~ s/:/,/g;
$extra .= ':' . $ip;
}
+
return "$flag$call$extra";
}
my ($call, $is_node, $is_extnode, $here, $version, $build, $ip) = @$s;
my @rout;
- # remove spurious IPV6 prefix on IPV4 addresses
- $ip =~ s/^::ffff:// if $ip;
- $build ||= 0;
- $version ||= 0;
-
if ($call) {
my $ncall = $parent->call;
if ($ncall ne $call) {
$conn->{peerhost} ||= $conn->{sock}->handle->peerhost if $conn->{sock};
$conn->{peerhost} ||= 'UNKNOWN';
}
+ $conn->{peerhost} =~ s/^::ffff://;
return $conn->{peerhost};
}