From f9fbccb42b30e28358cf59ee06e17a2d610561f6 Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 18 Sep 2001 14:46:16 +0000 Subject: [PATCH] allow console.pl to work in older browsers make rspfcheck slightly better --- perl/DXChannel.pm | 3 ++- perl/console.pl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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); -- 2.43.0