X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtout.pm;h=e00e1d724f3e44618b782a249bea0a172ca0fee9;hb=495e620d66fbc1b8c64dd65ff8d89fc43a2e6f08;hp=118261ef30450aaf96e5c2c3d729687049f7b5d5;hpb=aeb4c8591de710bd8de14f33817d2f0aabbd5e28;p=spider.git diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 118261ef..e00e1d72 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -19,9 +19,6 @@ use DXDebug; use strict; -use vars qw($VERSION $BRANCH); -($VERSION, $BRANCH) = dxver(q$Revision$); - use vars qw($sentencelth); $sentencelth = 180; @@ -120,7 +117,7 @@ sub pc17 # Request init string sub pc18 { - my $flags = " pc9[23]"; + my $flags = " pc9x"; $flags .= " xml" if DXXml::available(); return "PC18^DXSpider Version: $main::version Build: $main::build$flags^$DXProt::myprot_version^"; } @@ -417,15 +414,38 @@ sub pc92c return _gen_pc92('C', 1, @_); } +# send a 'find' message +sub pc92f +{ + my $target = shift; + my $from = shift; + return "PC92^$main::mycall^" . gen_pc9x_t() . "^F^$from^$target^H99^" +} + +# send a 'reply' message +sub pc92r +{ + my $to = shift; + my $target = shift; + my $flag = shift; + my $ms = shift; + return "PC92^$main::mycall^" . gen_pc9x_t() . "^R^$to^$target^$flag^$ms^H99^" +} + sub pc93 { my $to = shift; # *, callsign, chat group name, sysop my $from = shift; # from user callsign my $via = shift || '*'; # *, node call my $line = shift; # the text + my $origin = shift; # this will be present on proxying from PC10 + $line = unpad($line); $line =~ s/\^/\\5E/g; # remove any ^ characters - return "PC93^$main::mycall^" . gen_pc9x_t() . "^$to^$from^$via^$line^H99^"; + my $s = "PC93^$main::mycall^" . gen_pc9x_t() . "^$to^$from^$via^$line"; + $s .= "^$origin" if $origin; + $s .= "^H99^"; + return $s; } 1;