X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Frbn.pl;h=2bb8a0ee7188570518e974511eab1ccfb8b19860;hb=17b1614af3840c2c74bee181290eb094f8ed4a00;hp=e09daca7066f1f999d029ce636f6ac8d17f0e78c;hpb=811077a3d45e4f89012a9169061745b0b42fe97b;p=spider.git diff --git a/cmd/show/rbn.pl b/cmd/show/rbn.pl index e09daca7..2bb8a0ee 100644 --- a/cmd/show/rbn.pl +++ b/cmd/show/rbn.pl @@ -1,19 +1,14 @@ # -# show/node [ | ] +# show/rbn [all|,,,] # -# This command either lists all nodes known about -# or the ones specified on the command line together -# with some information that is relavent to them -# -# This command isn't and never will be compatible with AK1A -# -# A special millenium treat just for G4PDQ -# -# Copyright (c) 2000 Dirk Koopman G1TLH -# +# This command either lists all rbn users known about (sh/rbn all) +# or the ones specified on the command line, If no arguments are present +# then it will list all connected rbn/skimmer users. # +# Copyright (c) 2020 Dirk Koopman G1TLH # + my ($self, $line) = @_; return (1, $self->msg('e5')) unless $self->priv >= 1; @@ -23,7 +18,7 @@ my $count; # search thru the user if (@call == 0) { - @call = map{$_->call} grep {$_->user->call && $_->user->wantrbn} DXChannel::get_all_users(); + @call = sort map{$_->call} grep {$_->user->call && $_->user->wantrbn} DXChannel::get_all_users(); } elsif ($call[0] eq 'ALL') { shift @call; my ($action, $key, $data) = (0,0,0); @@ -47,8 +42,10 @@ foreach my $call (@call) { } ++$count; } -push @l, "" while @l < 5; -push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l; +if (@l) { + push @l, "" while @l < 5; + push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l; +} return (1, @out, $self->msg('rec', $count));