$inscroll = 0;
$spos = @sh < $pagel ? 0 : @sh - $pagel;
show_screen();
+ $conn->send_later("C$call|$cols") if $conn;
}
# cease communications
}
my $ch = $bot->getch(); # this is here just to catch RESIZE events
if (defined $ch) {
- if ($ch == KEY_RESIZE) {
+ if ($ch eq KEY_RESIZE) {
doresize();
} else {
- rec_stdin($ch) unless $ch == '-1';
+ rec_stdin($ch) unless $ch eq '-1';
}
}
$top->refresh() if $top->is_wintouched;
while (@ARGV && $ARGV[0] =~ /^-/) {
my $arg = shift;
- dbgadd('console'), $maxshist = 200 if $arg eq '-x';
+ if ($arg eq '-x') {
+ dbginit();
+ dbgadd('console');
+ $maxshist = 200;
+ }
}
$call = uc shift @ARGV if @ARGV;
exit(0);
}
-dbginit();
-
unless ($DB::VERSION) {
$SIG{'INT'} = \&sig_term;
$SIG{'TERM'} = \&sig_term;
$conn->{on_connect} = \&on_connect;
$conn->{on_disconnect} = \&on_disconnect;
-my $timer = Mojo::IOLoop->recurring(1, sub {DXLog::flushall()});
+my $timer = Mojo::IOLoop->recurring(1, sub {DXLog::flushall()}) if $DXDebug::fp;
$idle = Mojo::IOLoop->recurring(0.100 => \&idle_loop);
Mojo::IOLoop->singleton->reactor->io(\*STDIN => sub {