2 # show/node [<node> | <node> ]
4 # This command either lists all nodes known about
5 # or the ones specified on the command line together
6 # with some information that is relavent to them
8 # This command isn't and never will be compatible with AK1A
10 # A special millenium treat just for G4PDQ
12 # Copyright (c) 2000 Dirk Koopman G1TLH
17 my ($self, $line) = @_;
18 return (1, $self->msg('e5')) unless $self->priv >= 1;
22 my @call = map {uc $_} split /\s+/, $line;
26 # search thru the user for nodes
27 if ($call[0] eq 'ALL') {
29 my ($action, $key, $data) = (0,0,0);
30 for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
31 if ($data =~ m{sort => '[ACRSX]'}) {
36 } elsif (@call == 0) {
37 @call = map {$_->call} DXChannel::get_all_nodes();
41 foreach $call (@call) {
42 my $clref = Route::Node::get($call);
43 my $uref = DXUser->get_current($call);
46 my $pcall = sprintf "%-11s", $call;
47 push @out, $self->msg('snode1') unless @out > 0;
50 $sort = "Spider" if $uref->is_spider;
51 $sort = "AK1A " if $uref->is_ak1a;
52 $sort = "Clx " if $uref->is_clx;
53 $sort = "User " if $uref->is_user;
54 $sort = "BBS " if $uref->is_bbs;
55 $sort = "DXNet " if $uref->is_dxnet;
56 $sort = "ARClus" if $uref->is_arcluster;
58 push @out, $self->msg('snode3', $call);
61 if ($call eq $main::mycall) {
63 $ver = $main::version;
65 $ver = $clref->version if $clref && $clref->version;
68 my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver;
69 if ($uref->is_spider) {
70 push @out, $self->msg('snode2', $pcall, $sort, "$ver ");
72 push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : " ");
77 return (1, @out, $self->msg('rec', $count));