X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXProtout.pm;h=ec9abaa0b0f2c41e945fd205bb24c6dc7dc883e5;hb=2c50f9b4b2b3f29b000d77623a9d7c3748933aef;hp=5f1664d0a2646c2e8047133e5a5ca9f0c5fa3975;hpb=948528bfc08dcb29187ef90a1b3cac0c161f5c0b;p=spider.git diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 5f1664d0..ec9abaa0 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -6,7 +6,7 @@ # # Copyright (c) 1998 Dirk Koopman G1TLH # -# $Id$ +# # package DXProt; @@ -19,7 +19,7 @@ use DXDebug; use strict; -use vars qw($sentencelth); +use vars qw($sentencelth $pc19_version); $sentencelth = 180; @@ -117,9 +117,8 @@ sub pc17 # Request init string sub pc18 { - my $flags = " pc9x"; - $flags .= " xml" if DXXml::available(); - return "PC18^DXSpider Version: $main::version Build: $main::build$flags^$DXProt::myprot_version^"; + my $flags = shift; + return "PC18^DXSpider Version: $main::version Build: $main::subversion.$main::build$flags^$DXProt::myprot_version^"; } # @@ -138,6 +137,8 @@ sub pc19 my $here = $ref->here; my $conf = $ref->conf; my $version = $ref->version; + $version = $pc19_version unless $version =~ /^\d\d\d\d$/; + my $str = "^$here^$call^$conf^$version"; if (length($s) + length($str) > $sentencelth) { push @out, "PC19" . $s . sprintf "^%s^", get_hops(19); @@ -379,6 +380,7 @@ sub _gen_pc92 my $s = "PC92^$main::mycall^" . gen_pc9x_t() . "^$sort"; for (@_) { $s .= "^" . _encode_pc92_call($_, $ext); + $ext = 0; # only the first slot has an ext. } return $s . '^H99^'; } @@ -414,6 +416,12 @@ sub pc92c return _gen_pc92('C', 1, @_); } +# send a keep alive +sub pc92k +{ + return _gen_pc92('K', 1, @_); +} + # send a 'find' message sub pc92f {