fiz console.pl resizing
[spider.git] / perl / console.pl
index 6651272460eeba69b7c01fe46583785fadafbf52..6c93d5ff44aca8e762d6caddefbc8898624ab99d 100755 (executable)
@@ -131,6 +131,8 @@ sub do_resize
        $inscroll = 0;
        $spos = @sh < $pagel ? 0 :  @sh - $pagel;
        show_screen();
+       $conn->send_later("C$call|$cols") if $conn;
+       
 }
 
 # cease communications
@@ -242,7 +244,10 @@ sub addtotop
                        $inbuf =~ s/\s+/ /g;
                        if (length $inbuf > $cols) {
                                $Text::Wrap::columns = $cols;
-                               push @sh, split /\n/, wrap('',' ' x 19, $inbuf);
+                               my $token;
+                               ($token) = $inbuf =~ m!^(.* de [-\w\d/\#]+\s+|\w{9}\@\d\d:\d\d:\d\d )!;
+                               $token ||= ' ' x 19;
+                               push @sh, split /\n/, wrap('', ' ' x length($token), $inbuf);
                        } else {
                                push @sh, $inbuf;
                        }