X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fprefix.pl;h=0d46bb6a2cb4bccf4c5aa8d0c5000c00c926358f;hb=e0e8331285f425949d9a6717e39707c4310e9ccd;hp=200a4f1ee5331f98d547b49c3acab674a99b19cc;hpb=da7476ca7af0722de0cab439f6f4eea3d767daf4;p=spider.git diff --git a/cmd/show/prefix.pl b/cmd/show/prefix.pl index 200a4f1e..0d46bb6a 100644 --- a/cmd/show/prefix.pl +++ b/cmd/show/prefix.pl @@ -1,7 +1,7 @@ # # show the prefix info for each callsign or prefix entered # -# $Id$ +# # my ($self, $line) = @_; @@ -10,16 +10,23 @@ my @list = split /\s+/, $line; # generate a list of callsigns my $l; my @out; +#$DB::single = 1; + #print "line: $line\n"; foreach $l (@list) { my @ans = Prefix::extract($l); next if !@ans; +# dbg(join(', ', @ans)); my $pre = shift @ans; my $a; foreach $a (@ans) { - push @out, sprintf "%s DXCC: %d ITU: %d CQ: %d LL: %s %s (%s, %s)", uc $l, $a->dxcc, $a->itu, $a->cq, slat($a->lat), slong($a->long), $pre, $a->name; + push @out, substr(sprintf("%s CC: %d IZ: %d CZ: %d LL: %s %s %4.4s (%s, %s", uc $l, $a->dxcc, $a->itu, $a->cq, slat($a->lat), slong($a->long), $a->qra, $pre, $a->name), 0, 78) . ')'; $l = " " x length $l; } + if ($USDB::present && $ans[0]->state) { + push @out, sprintf "%s City: %s State: %s", $l, join (' ', map {ucfirst} split(/\s+/, lc $ans[0]->city)), $ans[0]->state; + } + } return (1, @out);