From: Dirk Koopman Date: Thu, 23 Jul 2020 15:12:21 +0000 (+0100) Subject: put sh/rbn into git! X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=811077a3d45e4f89012a9169061745b0b42fe97b put sh/rbn into git! --- diff --git a/cmd/show/rbn.pl b/cmd/show/rbn.pl new file mode 100644 index 00000000..e09daca7 --- /dev/null +++ b/cmd/show/rbn.pl @@ -0,0 +1,58 @@ +# +# show/node [ | ] +# +# 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 +# +# +# + +my ($self, $line) = @_; +return (1, $self->msg('e5')) unless $self->priv >= 1; + +my @call = map {uc $_} split /\s+/, $line; +my @out; +my $count; + +# search thru the user +if (@call == 0) { + @call = 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); + for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) { + if (is_callsign($key)) { + if ($data =~ /"sort":"[UW]"/ && $data =~ /"wantrbn":1/) { + push @call, $key; + } + } + } +} + +push @out, join(' ', $self->msg('rbnusers'), $main::mycall); +my @l; + +foreach my $call (@call) { + push @l, $call; + if (@l >= 5) { + push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l; + @l = (); + } + ++$count; +} +push @l, "" while @l < 5; +push @out, sprintf "%-12s %-12s %-12s %-12s %-12s", @l; + + +return (1, @out, $self->msg('rec', $count)); + + + +