1. I believe I have fixed all the login/logout 'broken pipe' errors
[spider.git] / perl / console.pl
index 5fd965ee8f1da9f0d3a950daed7036531d214495..643286f61c4c6091e7efb8c7c9a463c5ff2f0375 100755 (executable)
@@ -101,9 +101,9 @@ sub do_resize
 sub cease
 {
        my $sendz = shift;
-       if ($conn && $sendz) {
-               $conn->send_now("Z$call|bye...");
-       }
+#      if ($conn && $sendz) {
+#              $conn->send_now("Z$call|bye...");
+#      }
        endwin();
        dbgclose();
        print @_ if @_;
@@ -214,13 +214,20 @@ sub rec_socket
                cease(1);
        }
        if (defined $msg) {
-               my ($sort, $call, $line) = $msg =~ /^(\w)(\S+)\|(.*)$/;
+               my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
                
                if ($sort && $sort eq 'D') {
                        addtotop($line);
                } elsif ($sort && $sort eq 'Z') { # end, disconnect, go, away .....
                        cease(0);
                }         
+               # ******************************************************
+               # ******************************************************
+               # any other sorts that might happen are silently ignored.
+               # ******************************************************
+               # ******************************************************
+       } else {
+               cease(0);
        }
        $top->refresh();
        $lasttime = time;