X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtout.pm;h=c49f953aec4b1327ef889ae28aeeec6c1b10a69c;hb=093ac03207bd4468fa89dc7438936b245a92cbe5;hp=9a782960827068a10265f69f84ab17044283749c;hpb=69c8aeb338cc485103e289fbab7ec4e7e056ed20;p=spider.git diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 9a782960..c49f953a 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -41,7 +41,7 @@ sub pc11 my $hops = get_hops(11); my $t = time; $text = ' ' if !$text; - return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$hops^~", $freq, cldate($t), ztime($t); + return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$main::mycall^$hops^~", $freq, cldate($t), ztime($t); } # create an announce message @@ -153,6 +153,23 @@ sub pc24 return "PC24^$call^$flag^$hops^"; } + +# create a merged dx message (freq, dxcall, t, text, spotter, orig-node) +sub pc26 +{ + my ($freq, $dxcall, $t, $text, $spotter, $orignode) = @_; + $text = ' ' unless $text; + $orignode = $main::mycall unless $orignode; + return sprintf "PC26^%.1f^$dxcall^%s^%s^$text^$spotter^$orignode^ ^~", $freq, cldate($t), ztime($t); +} + +# create a merged WWV spot (logger, t, sfi, a, k, forecast, orig-node) +sub pc27 +{ + my ($logger, $t, $sfi, $a, $k, $forecast, $orignode) = @_; + return sprintf "PC27^%s^%-2.2s^$sfi^$a^$k^$forecast^$logger^$orignode^ ^~", cldate($t), ztime($t); +} + # message start (fromnode, tonode, to, from, t, private, subject, origin) sub pc28 { @@ -168,7 +185,8 @@ sub pc28 sub pc29 { my ($fromnode, $tonode, $stream, $text) = @_; - $text =~ s/\^//og; # remove ^ + $text =~ s/\^/:/og; # remove ^ +# $text =~ s/\~/S/og; return "PC29^$fromnode^$tonode^$stream^$text^~"; } @@ -217,13 +235,7 @@ sub pc35 # send all the DX clusters I reckon are connected sub pc38 { - my @list = DXNode->get_all(); - my $list; - my @nodes; - - foreach $list (@list) { - push @nodes, $list->call; - } + my @nodes = map { ($_->dxchan && $_->dxchan->isolate) ? () : $_->call } DXNode->get_all(); return "PC38^" . join(',', @nodes) . "^~"; }