version with the 'final' version of PC90 line in it
[spider.git] / perl / DXProtout.pm
index cacf60e0c756a67612452ab192bb07c50be157c6..38ace99bf1cb2ac9e379943a31805f58c23582e1 100644 (file)
@@ -367,27 +367,30 @@ sub pc90
        my $sort = shift;
        my @out;
        my $dxchan;
-       my $n = @_;
        
        while (@_) {
-               my $str = sprintf "PC90^%s^%X^%s%d", $node->call, $main::systime, $sort, $n-1 ;
-               for (; @_ && length $str < 200;) {
+               my $str = '';
+               for (; @_ && length $str <= 230;) {
                        my $ref = shift;
-                       next if $ref == $main::me;
                        my $call = $ref->call;
                        my $flag = 0;
+                       
                        $flag += 1 if $ref->here;
                        $flag += 2 if $ref->conf;
                        if ($ref->is_node) {
                                my $ping = int($ref->pingave * 10);
                                $str .= "^N$flag$call,$ping";
+                               my $v = $ref->build || $ref->version;
+                               $str .= ",$v" if defined $v;
                        } else {
                                $str .= "^U$flag$call";
                        }
                }
-               $str .= sprintf "^%s^", get_hops(90);
-               push @out, $str;
+               push @out, $str if $str;
        }
+       my $n = @out;
+       my $h = get_hops(90);
+       @out = map { sprintf "PC90^%s^%X^%s%d%s^%s^", $node->call, $main::systime, $sort, --$n, $_, $h } @out;
        return @out;
 }