projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix rcmds so that they are easier to maintain and more reliable
[spider.git]
/
cmd
/
show
/
configuration.pl
diff --git
a/cmd/show/configuration.pl
b/cmd/show/configuration.pl
index 6f2e1e935a8014f06c5373138675fc0de94d7307..a49ffeec990317d55cafc473b502627d150a785d 100644
(file)
--- a/
cmd/show/configuration.pl
+++ b/
cmd/show/configuration.pl
@@
-9,14
+9,14
@@
my ($self, $line) = @_;
my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes
my @out;
my ($self, $line) = @_;
my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes
my @out;
-my @nodes = sort {$a->call cmp $b->call} (
DX
Node::get_all());
+my @nodes = sort {$a->call cmp $b->call} (
Route::
Node::get_all());
my $node;
my @l;
my @val;
push @out, "Node Callsigns";
if ($list[0] && $list[0] =~ /^NOD/) {
my $node;
my @l;
my @val;
push @out, "Node Callsigns";
if ($list[0] && $list[0] =~ /^NOD/) {
- my @ch = sort {$a->call cmp $b->call} DX
Prot::get_all_ak1a
();
+ my @ch = sort {$a->call cmp $b->call} DX
Channel::get_all_nodes
();
my $dxchan;
foreach $dxchan (@ch) {
my $dxchan;
foreach $dxchan (@ch) {
@@
-34,8
+34,8
@@
if ($list[0] && $list[0] =~ /^NOD/) {
push @l, "";
$i = 0;
}
push @l, "";
$i = 0;
}
- my $s = $call->
{call}
;
- $s = sprintf "(%s)", $s
if $call->{here} == 0
;
+ my $s = $call->
call
;
+ $s = sprintf "(%s)", $s
unless $call->here
;
push @l, $s;
$i++;
}
push @l, $s;
$i++;
}
@@
-44,17
+44,16
@@
if ($list[0] && $list[0] =~ /^NOD/) {
} else {
# build up the screen from the Node table
foreach $node (@nodes) {
} else {
# build up the screen from the Node table
foreach $node (@nodes) {
- next if scalar @list && !grep $node->call
eq $_
, @list;
+ next if scalar @list && !grep $node->call
=~ /^$_/
, @list;
my $call = $node->call;
my $call = $node->call;
- $call = "($call)"
if $node->here == 0
;
+ $call = "($call)"
unless $node->here
;
@l = ();
push @l, $call;
@l = ();
push @l, $call;
- my $nlist = $node->list;
- @val = sort {$a->call cmp $b->call} values %{$nlist};
+ @val = sort $node->users;
my $i = 0;
my $i = 0;
- if (@val == 0 && $node->user
s
) {
- push @l, sprintf "(%d users)", $node->user
s
;
+ if (@val == 0 && $node->user
count
) {
+ push @l, sprintf "(%d users)", $node->user
count
;
}
foreach $call (@val) {
if ($i >= 5) {
}
foreach $call (@val) {
if ($i >= 5) {
@@
-63,8
+62,13
@@
if ($list[0] && $list[0] =~ /^NOD/) {
push @l, "";
$i = 0;
}
push @l, "";
$i = 0;
}
- my $s = $call->{call};
- $s = sprintf "(%s)", $s if $call->{here} == 0;
+ my $uref = Route::User::get($call);
+ my $s = $call;
+ if ($uref) {
+ $s = sprintf "(%s)", $call unless $uref->here;
+ } else {
+ $s = "$call?";
+ }
push @l, $s;
$i++;
}
push @l, $s;
$i++;
}