From: minima Date: Tue, 18 Sep 2001 14:46:16 +0000 (+0000) Subject: allow console.pl to work in older browsers X-Git-Tag: R_1_49~114 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9fbccb42b30e28358cf59ee06e17a2d610561f6;p=spider.git allow console.pl to work in older browsers make rspfcheck slightly better --- diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 61e6a5d3..c4a81c7f 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -508,7 +508,8 @@ sub rspfcheck if ($nref) { if ($nref->dxchan == $self) { return 1 unless $user; - return 1 if grep $user eq $_, $nref->users; + my @users = $nref->users; + return 1 if @users == 0 || grep $user eq $_, @users; dbg("RSPF: $user not on $node") if isdbg('rspf'); } else { dbg("RSPF: Shortest path for $node is " . $nref->dxchan->{call}) if isdbg('rspf'); diff --git a/perl/console.pl b/perl/console.pl index 2be85989..0642e4b9 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -79,7 +79,7 @@ sub do_initscr init_pair(12, COLOR_MAGENTA, COLOR_BLUE); init_pair(13, COLOR_YELLOW, COLOR_GREEN); init_pair(14, COLOR_RED, COLOR_GREEN); - assume_default_colors($foreground, $background); + eval { assume_default_colors($foreground, $background) }; } $top = $scr->subwin($lines-4, $cols, 0, 0);