change version strings to include perl version
[spider.git] / cmd / show / version.pl
1 #
2 # show the version number of the software + copyright info
3 #
4 # Copyright (c) 1998 Dirk Koopman G1TLH
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my @out;
11 my @in = map {uc} split /\s+/, $line;
12
13 if ($self->priv > 5 && @in) {
14 #               $DB::single=1;
15
16         my $q = $in[0] eq 'ALL' ? '.*' : join('|', @in);
17         my @n = sort {$a->call cmp $b->call} grep {$_->call =~ /^(?:$q)/} Route::Node::get_all();
18         push @out, " Node      Version  Build  PC9X  via PC92";
19         foreach my $n (@n) {
20                 push @out, sprintf " %-10s  %5d  %5s   %3s       %3s", $n->call, $n->version, $n->build, yesno($n->do_pc9x), yesno($n->via_pc92);
21         }
22         push @out, ' ' . scalar @n . " Nodes found";
23 } else {
24         my ($year) = (gmtime($main::systime))[5];
25         $year += 1900;
26         push @out, "DXSpider v$main::version (build $main::build git: $main::gitbranch/$main::gitversion) using perl $^V on \u$^O";
27         push @out, "Copyright (c) 1998-$year Dirk Koopman G1TLH";
28 }
29
30
31 return (1, @out);