squash some warnings
[spider.git] / perl / DXProtHandle.pm
index 0beabcf224b11d3697bfe76f4d86bab5aa1d1a22..cd6a7518348d007968a25cea940334d27db2dfee 100644 (file)
@@ -224,10 +224,13 @@ sub handle_11
        # add it
        Spot::add(@spot);
 
+       my $ip = '';
+       $ip ||= $spot[14] if exists $spot[14];
        if (isdbg('progress')) {
-               my $ip = '';
-               $ip = sprintf "($spot[14])" if $spot[14]; 
-               my $s = sprintf "SPOT: $spot[1] on $spot[0] \@ %s by $spot[4]$ip\@$spot[7]", cldatetime($spot[2]);
+               my $sip = $ip ? sprintf "($ip)" : '' unless $ip =~ m|[\(\)\*]|;
+               $sip ||= '';
+               my $d = ztime($spot[2]);
+               my $s = "SPOT: $spot[1] on $spot[0] \@ $d by $spot[4]$sip\@$spot[7]";
                $s .= " '$spot[3]'" if $spot[3];
                dbg($s);
        }
@@ -1478,6 +1481,9 @@ sub _add_thingy
        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;
+       
        if ($call) {
                my $ncall = $parent->call;
                if ($is_node) {