X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fversion.pl;h=0b0f0cfb66df9645b7675af023173a2810f48c22;hb=e0e8331285f425949d9a6717e39707c4310e9ccd;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/show/version.pl b/cmd/show/version.pl index e69de29b..0b0f0cfb 100644 --- a/cmd/show/version.pl +++ b/cmd/show/version.pl @@ -0,0 +1,31 @@ +# +# show the version number of the software + copyright info +# +# Copyright (c) 1998 Dirk Koopman G1TLH +# +# +# + +my ($self, $line) = @_; +my @out; +my @in = map {uc} split /\s+/, $line; + +if ($self->priv > 5 && @in) { +# $DB::single=1; + + my $q = $in[0] eq 'ALL' ? '.*' : join('|', @in); + my @n = sort {$a->call cmp $b->call} grep {$_->call =~ /^(?:$q)/} Route::Node::get_all(); + push @out, " Node Version Build PC9X via PC92"; + foreach my $n (@n) { + push @out, sprintf " %-10s %5d %5s %3s %3s", $n->call, $n->version, $n->build, yesno($n->do_pc9x), yesno($n->via_pc92); + } + push @out, ' ' . scalar @n . " Nodes found"; +} else { + my ($year) = (gmtime($main::systime))[5]; + $year += 1900; + push @out, "DX Spider Cluster version $main::version (build $main::build git: $main::gitbranch/$main::gitversion) on \u$^O"; + push @out, "Copyright (c) 1998-$year Dirk Koopman G1TLH"; +} + + +return (1, @out);