get all the debugging finally into the debug files when things go wrong
[spider.git] / perl / client.pl
index 642f80c6e0bf6b54604dbdf2758820bc035fde53..6327ee5fd1c86ac61f648a033755c28a545d9e1f 100755 (executable)
@@ -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;
@@ -428,8 +427,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;
                }