X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtout.pm;h=ba3013389b8f13b26dc6acf7f900621734498e9c;hb=cd5b993f99b52d3c3c51779e9ea1fa150232225e;hp=03676089dc33acd5b5072cd973f0babb32258398;hpb=0cbfabaee9288f28566fc2b3ac18d97841ea061d;p=spider.git diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 03676089..ba301338 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -11,7 +11,7 @@ package DXProt; -@ISA = qw(DXProt DXChannel); +@ISA = qw(DXChannel); use DXUtil; use DXM; @@ -47,7 +47,7 @@ sub pc10 return "PC10^$from^$user1^$text^*^$user2^$origin^~"; } -# create a dx message (call, freq, dxcall, text) +# create a dx message (call, freq, dxcall, text) see also pc61 sub pc11 { my ($mycall, $freq, $dxcall, $text) = @_; @@ -58,6 +58,17 @@ sub pc11 return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$main::mycall^$hops^~", $freq, cldate($t), ztime($t); } +# create a dx message (call, freq, dxcall, text, $ipaddr) see also pc11 +sub pc61 +{ + my ($mycall, $freq, $dxcall, $text, $ipaddr) = @_; + my $hops = get_hops(61) || get_hops(11); + my $t = time; + $text = ' ' if !$text; + $text =~ s/\^/%5E/g; + return sprintf "PC61^%.1f^$dxcall^%s^%s^$text^$mycall^$main::mycall^$ipaddr^$hops^~", $freq, cldate($t), ztime($t); +} + # create an announce message sub pc12 { @@ -385,7 +396,7 @@ sub _gen_pc92 } for (@_) { $s .= '^' . _encode_pc92_call($_, $ext); - $ext = 0; # only the first slot has an ext. + $ext = 0 unless $sort eq 'A'; # only the first slot has an ext. } return $s . '^H99^'; } @@ -410,7 +421,7 @@ sub gen_pc92_with_time # add a local one sub pc92a { - return _gen_pc92('A', 0, @_); + return _gen_pc92('A', 2, @_); } # delete a local one