try and get the hops correct
authorminima <minima>
Mon, 21 Mar 2005 11:15:36 +0000 (11:15 +0000)
committerminima <minima>
Mon, 21 Mar 2005 11:15:36 +0000 (11:15 +0000)
perl/Thingy/Dx.pm

index 596f5933abfbc3326caa2ca8dca6667c25b58ef1..feab1b94c83f93295d82b03beed5a9faf61ad445 100644 (file)
@@ -66,10 +66,11 @@ sub gen_DXProt
        unless ($thing->{DXProt}) {
                my $sd = $thing->{spotdata};
                my $hops = $thing->{hops} || DXProt::get_hops(11);
+               $hops = "H$hops" unless $hops =~ /^H/;
                my $text = $sd->[3] || ' ';
                $text =~ s/\^/\%5E/g;
                my $t = $sd->[2];
-               $thing->{DXProt} = sprintf "PC11^%.1f^$sd->[1]^%s^%s^%s^$sd->[4]^$sd->[7]^H$hops^~", $sd->[0], cldate($t), ztime($t), $text;
+               $thing->{DXProt} = sprintf "PC11^%.1f^$sd->[1]^%s^%s^%s^$sd->[4]^$sd->[7]^$hops^~", $sd->[0], cldate($t), ztime($t), $text;
        }
        return $thing->{DXProt};
 }