X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fclient.pl;h=91d4add615bf049cc2fbaa3380c0c99437878a83;hb=a565e3b0349dfe4f82233fa30c7dc1ae09ff028a;hp=642f80c6e0bf6b54604dbdf2758820bc035fde53;hpb=a57ea9d5501f6d319a8cbfff997bad077cc31010;p=spider.git diff --git a/perl/client.pl b/perl/client.pl index 642f80c6..91d4add6 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -46,14 +46,13 @@ use Net::Telnet qw(TELOPT_ECHO); use IO::File; use IO::Socket; use IPC::Open2; -use Carp qw{cluck}; # cease communications sub cease { my $sendz = shift; if ($conn && $sendz) { - $conn->send_now("Z$call|bye...\n"); + $conn->send_now("Z$call|bye..."); sleep(1); } $stdout->flush if $stdout; @@ -148,7 +147,13 @@ sub rec_socket $buffered = $line; # set buffered or unbuffered } elsif ($sort eq 'Z') { # end, disconnect, go, away ..... cease(0); - } + } + + # ****************************************************** + # ****************************************************** + # any other sorts that might happen are silently ignored. + # ****************************************************** + # ****************************************************** } $lasttime = time; } @@ -428,8 +433,8 @@ if ($connsort eq "connect") { 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; - dochat($1, $2) if /\s*\'(.*)\'\s+\'(.*)\'/io; - if (/\s*cl\w+\s+(.*)/io) { + dochat($1, $2) if /^\s*\'(.*)\'\s+\'(.*)\'/io; + if (/^\s*cl\w+\s+(.*)/io) { doclient($1); last; }