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;
19 return (1, $self->msg('storable')) unless $DXUser::v3;
21 my @call = map {uc $_} split /\s+/, $line;
25 # search thru the user for nodes
26 if ($call[0] eq 'ALL') {
28 my ($action, $key, $data) = (0,0,0);
29 for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) {
30 if ($data =~ m{\01[ACRSX]\0\0\0\04sort}) {
35 } elsif (@call == 0) {
36 @call = map {$_->call} DXChannel::get_all_nodes();
40 foreach $call (@call) {
41 my $clref = Route::Node::get($call);
42 my $uref = DXUser->get_current($call);
43 my ($sort, $ver, $build);
45 my $pcall = sprintf "%-11s", $call;
46 push @out, $self->msg('snode1') unless @out > 0;
49 $sort = "Spider" if $uref->is_spider;
50 $sort = "AK1A " if $uref->is_ak1a;
51 $sort = "Clx " if $uref->is_clx;
52 $sort = "User " if $uref->is_user;
53 $sort = "BBS " if $uref->is_bbs;
54 $sort = "DXNet " if $uref->is_dxnet;
55 $sort = "ARClus" if $uref->is_arcluster;
57 push @out, $self->msg('snode3', $call);
62 if ($call eq $main::mycall) {
64 $ver = $main::version;
66 $ver = $clref->version if $clref && $clref->version;
67 $ver = $uref->version if $ver && $uref->version;
70 my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver;
71 if ($uref->is_spider) {
72 $ver -= 53 if $ver > 54;
73 $build = "build: " . $uref->build if $uref->build;
74 push @out, $self->msg('snode2', $pcall, $sort, "$ver $build");
76 push @out, $self->msg('snode2', $pcall, $sort, $ver ? "$major\-$minor.$subs" : " ");
81 return (1, @out, $self->msg('rec', $count));