X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fconsole.pl;h=eae1c0ff4451a477af22765c3d36cfd3f00bc538;hb=d4af9b75c46cddd2cc830961eb615975ed260a9e;hp=8af9f3b3aed640fb6500efa34d1c471a1f192b38;hpb=fa9e414f691e4e9a80c80eb54cb7b1e971976b22;p=spider.git diff --git a/perl/console.pl b/perl/console.pl index 8af9f3b3..eae1c0ff 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -241,7 +241,7 @@ sub rec_socket my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/; if ($sort && $sort eq 'D') { - $line = " " unless $line; + $line = " " unless length($line); addtotop($line); } elsif ($sort && $sort eq 'Z') { # end, disconnect, go, away ..... cease(0); @@ -269,11 +269,12 @@ sub rec_stdin # print "sys: $r ($prbuf)\n"; if (defined $r) { + $r = '0' if !$r; if ($r eq KEY_ENTER || $r eq "\n" || $r eq "\r") { # save the lines - $inbuf = " " unless $inbuf; + $inbuf = " " unless length($inbuf); # check for a pling and do a search back for a command if ($inbuf =~ /^!/o) { @@ -392,7 +393,7 @@ sub rec_stdin } elsif ($r eq KEY_RESIZE || $r eq "\0632") { do_resize(); return; - } elsif (is_pctext($r)) { + } elsif (defined is_pctext($r)) { # move the top screen back to the bottom if you type something if ($spos < @shistory) { $spos = @shistory;