add current node to console.pl
authorDirk Koopman <djk@tobit.co.uk>
Mon, 6 Jul 2020 14:32:29 +0000 (15:32 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Mon, 6 Jul 2020 14:32:29 +0000 (15:32 +0100)
RBN.mojo
perl/console.pl

index 8a66c92d5630788c984765dfc7a734ea7e9f46cf..1195f6db7bed5839c36b6c671f15b95a6985d550 100644 (file)
--- a/RBN.mojo
+++ b/RBN.mojo
@@ -212,10 +212,11 @@ unset/wantrbn
 
 Very soon this will be replaced with a '(un)set/skimmer' command that
 allow the user to choose which categories they want. Filtering can be
-used in conjunction with this command to further refine output.
+used in conjunction with this proposed command to further refine
+output.
 
 This still very much "work in progress" and will be subject to
-change. But I am grateful to the feedback I have received
+change. But I am grateful to the feedback I have received, so far,
 from:
 
 Kin EA3CV
index 48c7ff8c1c756210911f4250a79980f6ca0c3c2b..2a88f5b5db7aff99cd7dc3bf8d2ba86f6b3f5ef4 100755 (executable)
@@ -52,6 +52,7 @@ use Console;
 #
 
 $call = "";                     # the callsign being used
+$node = "";                     # the node callsign being used
 $conn = 0;                      # the connection object for the cluster
 $lasttime = time;               # lasttime something happened on the interface
 
@@ -69,19 +70,13 @@ $inscroll = 0;
 
 $DXDebug::no_stdout = 1;
 
-sub mydbg
-{
-       local *STDOUT = undef;
-       dbg(@_);
-}
-
 # do the screen initialisation
 sub do_initscr
 {
        $scr = new Curses;
        if ($has_colors) {
                start_color();
-               init_pair("0", $foreground, $background);
+               init_pair(0, $foreground, $background);
 #              init_pair(0, $background, $foreground);
                init_pair(1, COLOR_RED, $background);
                init_pair(2, COLOR_YELLOW, $background);
@@ -245,12 +240,13 @@ sub show_screen
        my $size = $lines . 'x' . $cols . '-'; 
        my $add = "-$spos-$shl";
     my $time = ztime(time);
-       my $str =  "-" . $time . '-' . ($inscroll ? 'S':'-') . '-' x ($cols - (length($size) + length($call) + length($add) + length($time) + 3));
+       my $c = "$call\@$node";
+       my $str =  "-" . $time . '-' . ($inscroll ? 'S':'-') . '-' x ($cols - (length($size) + length($c) + length($add) + length($time) + 3));
        $scr->addstr($lines-4, 0, $str);
        
        $scr->addstr($size);
        $scr->attrset($mycallcolor) if $has_colors;
-       $scr->addstr($call);
+       $scr->addstr($c);
        $scr->attrset(COLOR_PAIR(0)) if $has_colors;
     $scr->addstr($add);
        $scr->refresh();
@@ -558,7 +554,9 @@ while (@ARGV && $ARGV[0] =~ /^-/) {
 }
 
 $call = uc shift @ARGV if @ARGV;
-$call = uc $myalias if !$call;
+$call = uc $myalias unless $call;
+$node = uc $mycall unless $node;
+
 my ($scall, $ssid) = split /-/, $call;
 $ssid = undef unless $ssid && $ssid =~ /^\d+$/;  
 if ($ssid) {