+22Feb01=======================================================================
+1. Added platform name to sh/version
+2. changed client.pl so that it send \r\n instead of \n on telnet connects
+3. added lineend '\r\n' command to connect scripts so you can override
+defaults
03Feb01=======================================================================
1. Changes and additions to the manual and added a help file for sh/log (g0vgs)
13Jan01=======================================================================
my @out;
-push @out, "DX Spider Cluster version $main::version";
+push @out, "DX Spider Cluster version $main::version on \u$^O";
push @out, "Copyright (c) 1998-2001 Dirk Koopman G1TLH";
return (1, @out);
{
if ($mode == 1) {
$mynl = "\r";
+ $out_lineend = "\r";
} else {
$mynl = "\n";
+ $out_lineend = "\r\n";
}
$/ = $mynl;
}
$timeout = $val;
}
+sub dolineend
+{
+ my $val = shift;
+ $out_lineend = $val;
+ $out_lineend =~ s/\\r/\r/g;
+ $out_lineend =~ s/\\n/\n/g;
+ dbg('connect', "lineend set to $val ");
+ $out_lineend = $mynl unless $out_lineend;
+}
+
sub dochat
{
my ($expect, $send) = @_;
}
if ($send) {
if ($csort eq 'telnet') {
- $sock->print("$send\n");
+ local $\ = $out_lineend;
+ $sock->print("$send$out_lineend");
} elsif ($csort eq 'ax25') {
- local $\ = "\r";
+ local $\ = $out_lineend;
$wfh->print("$send");
}
dbg('connect', "sent \"$send\"");
$pid = 0; # the pid of the child program
$csort = ""; # the connection type
$sock = 0; # connection socket
+$out_lineend = $mynl; # connection lineending (used for outgoing connects)
$stdin = *STDIN;
$stdout = *STDOUT;
doconnect($1, $2) if /^\s*co\w*\s+(\w+)\s+(.*)$/io;
doabort($1) if /^\s*a\w*\s+(.*)/io;
dotimeout($1) if /^\s*t\w*\s+(\d+)/io;
+ dolineend($1) if /^\s*[Ll]\w*\s+\'((?:\\[rn])+)\'/;
dochat($1, $2) if /^\s*\'(.*)\'\s+\'(.*)\'/io;
+
if (/^\s*cl\w+\s+(.*)/io) {
doclient($1);
last;