]> dxcluster.org Git - spider.git/commitdiff
allow console.pl to work in older browsers
authorminima <minima>
Tue, 18 Sep 2001 14:46:16 +0000 (14:46 +0000)
committerminima <minima>
Tue, 18 Sep 2001 14:46:16 +0000 (14:46 +0000)
make rspfcheck slightly better

perl/DXChannel.pm
perl/console.pl

index 61e6a5d3e9dd31dd2ac094d7e34ce168c8248256..c4a81c7f509b503a9c3025217f2a3f80b45c5177 100644 (file)
@@ -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');
index 2be859894ad459b1ffdbf7ae0fc707a442fa7e94..0642e4b9b09240d26269c0478ca7b4ea13b425ed 100755 (executable)
@@ -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);