use strict;
-use vars qw($VERSION $BRANCH);
-($VERSION, $BRANCH) = dxver(q$Revision$);
-
use vars qw($sentencelth);
$sentencelth = 180;
{
my ($from, $to, $via, $text, $origin) = @_;
my ($user1, $user2);
- if ($via && $via ne $to) {
+ if ($via && $via ne $to && $via ne '*') {
$user1 = $via;
$user2 = $to;
} else {
# Request init string
sub pc18
{
- my $flags = " pc92 pc9[2]";
+ my $flags = " pc9x";
$flags .= " xml" if DXXml::available();
return "PC18^DXSpider Version: $main::version Build: $main::build$flags^$DXProt::myprot_version^";
}
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
+ my $s = "PC93^$main::mycall^" . gen_pc9x_t() . "^$to^$from^$via^$line";
+ $s .= "^$origin" if $origin;
+ $s .= "^H99^";
+ return $s;
+}
+
1;
__END__