+22Jun04=======================================================================
+1. Add the show/mydx command which *may* filter your spots using your
+spot filter.
17Jun04=======================================================================
1. alter processing of PC17 to see if they get distributed more than now.
14Jun04=======================================================================
'^sho?w?/fdx/(\d+)', 'show/dx real $1', 'show/fdx',
'^sho?w?/fdx/d(\d+)', 'show/dx real from $1', 'show/fdx',
'^sho?w?/fdx', 'show/dx real', 'show/fdx',
+ '^sho?w?/myd?x?/(\d+)-(\d+)', 'show/dx filter $1-$2', 'show/mydx',
+ '^sho?w?/myd?x?/(\d+)', 'show/dx filter $1', 'show/mydx',
+ '^sho?w?/myd?x?/d(\d+)', 'show/dx filter from $1', 'show/mydx',
+ '^sho?w?/myd?x?', 'show/dx filter', 'show/mydx',
'^sho?w?/newc/n', 'show/newconfiguration node', 'show/newconfiguration',
'^sho?w?/tnc', 'who', 'who',
'^sho?w?/up', 'show/cluster', 'show/cluster',
logging programs that can't cope with normal sh/dx
output. An alias of SHOW/FDX is available.
+ filter Filter the spots, before output, with the user's
+ spot filter. An alias of SHOW/MYDX is available.
+
e.g.
SH/DX 9m0
should be noted that the figures will probably not be very useful, nor
terrible accurate, but it is included for completeness.
+=== 0^SHOW/MYDX^Show the DX data filtered with your spot filter.
+SHOW/DX potentially shows all the spots available in the system. Using
+SHOW/MYDX will, instead, filter the availble spots using any spot filter
+that you have set, first.
+
+This command, together with ACCEPT/SPOT or REJECT/SPOT, will allow
+you to customise the spots that you receive.
+
+So if you have said: ACC/SPOT freq on hf
+
+Doing a SHOW/MYDX will now only, ever, show HF spots. All the other
+options on SH/DX can still be used.
+
=== 0^SHOW/NEWCONFIGURATION [<node>]^Show all the nodes and users visible
This command allows you to see all the users that can be seen
and the nodes to which they are connected.
my $dxcc;
my $real;
my $fromdxcc;
-my ($doqsl, $doiota, $doqra);
+my ($doqsl, $doiota, $doqra, $dofilter);
while ($f = shift @list) { # next field
# print "f: $f list: ", join(',', @list), "\n";
}
next;
}
+ if (lc $f =~ /^filt/) {
+ $dofilter = 1;
+ next;
+ }
if (lc $f eq 'qsl') {
$doqsl = 1;
next;
#print "expr: $expr from: $from to: $to fromday: $fromday today: $today\n";
# now do the search
-my @res = Spot::search($expr, $fromday, $today, $from, $to, $hint);
+my @res = Spot::search($expr, $fromday, $today, $from, $to, $hint, $dofilter);
my $ref;
my @dx;
foreach $ref (@res) {
return @out;
}
+# get the full country data (dxcc, itu, cq, state) as a list
+# from a callsign.
+sub cty_data
+{
+ my $call = shift;
+
+ my @dxcc = extract($call);
+ return @dxcc ? ($dxcc[1]->dxcc, $dxcc[1]->itu, $dxcc[1]->cq, $dxcc[1]->state) : ();
+}
+
my %valid = (
lat => '0,Latitude,slat',
long => '0,Longitude,slong',
sub add
{
- my $buf = join("\^", @_[0..7]);
+ my $buf = join("\^", @_);
$fp->writeunix($_[2], $buf);
$totalspots++;
if ($_[0] <= 30000) {
sub search
{
- my ($expr, $dayfrom, $dayto, $from, $to, $hint) = @_;
+ my ($expr, $dayfrom, $dayto, $from, $to, $hint, $dofilter) = @_;
my $eval;
my @out;
my $ref;
for (\$c = \$#spots; \$c >= 0; \$c--) {
\$ref = \$spots[\$c];
if ($expr) {
+ if (\$dofilter && \$self->{inspotsfilter}) {
+ if (\@\$spot < 9) {
+ my i\@dxcc = Prefix::cty_data(\$spot->[1]);
+ if (\@dxcc) {
+ pop \@dxcc;
+ push \@\$spot, \@dxcc;
+ }
+ \@dxcc = Prefix::cty_data(\$spot->[4]);
+ if (\@dxcc) {
+ pop \@dxcc;
+ push \@\$spot, \@dxcc;
+ }
+ }
+ my (\$filter, \$hops) = \$self->{inspotsfilter}->it(\@\$spot);
+ next unless (\$filter);
+ }
\$count++;
next if \$count < \$from; # wait until from
push(\@out, \$ref);
}
}
);
+
+ dbg("Spot eval: $eval") if isdbg('searcheval');
+
$fp->close; # close any open files