X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fclient.pl;h=ddf3fd3ba6adba52f6ed6f19ccab464d613dbd05;hb=dc016a0633cdb15d29b9a71fdec2c230fbad201b;hp=06d4cbc49bf16ab274d4fa926538f35090816b74;hpb=d4074d9835e4c0f7d6d66b9f7eaf522f9ba25728;p=spider.git diff --git a/perl/client.pl b/perl/client.pl index 06d4cbc4..ddf3fd3b 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -94,6 +94,7 @@ sub setmode $out_lineend = "\r\n"; } $/ = $mynl; + $out_lineend = $mynl; } # handle incoming messages @@ -235,7 +236,13 @@ sub doconnect $sock->output_record_separator(''); $sock->option_accept(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO); $sock->open($host) or die "Can't connect to $host port $port $!"; - $sock->binmode(1); + if ($port == 23) { + $sock->telnetmode(1); + $sock->option_send(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO) if $port == 23; + } else { + $sock->telnetmode(0); + } + $sock->binmode(0); $mode = 3; } elsif ($sort eq 'ax25' || $sort eq 'prog') { my @args = split /\s+/, $line; @@ -316,8 +323,8 @@ sub dochat } if ($send) { if ($csort eq 'telnet') { - local $\ = $out_lineend; - $sock->print("$send$out_lineend"); +# local $\ = $out_lineend; + $sock->print("$send\n"); } elsif ($csort eq 'ax25') { local $\ = $out_lineend; $wfh->print("$send");