the even more rare case of you wanting to prevent PC19s being routed thru
your node, you can use unset/routepc19. THIS IS NOT A SUBSTITUTE FOR ROUTE
FILTERING!!!!! [translators: I have added wpc16s, wpc16u, wpc19s, wpc19u]
+2. Alter the export_user command to remove users that have no useful info
+and have not been seen for more than (default) 1 year.
17Jan03=======================================================================
1. Fix problem with lines being left in the main input queue for a
disconnected/ing node.
}
} else {
$pc19list{$call} = [] unless exists $pc19list{$call};
- push @{$pc19list{$call}}, [$self->{call}, $ver, $flags];
+ my $nl = $pc19list{$call};
+ push @{$pc19list{$call}}, [$self->{call}, $ver, $flags] unless grep $_->[0] eq $self->{call}, @$nl;
}
}
$main::build += $VERSION;
$main::branch += $BRANCH;
-use vars qw(%u $dbm $filename %valid $lastoperinterval $lasttime $lru $lrusize);
+use vars qw(%u $dbm $filename %valid $lastoperinterval $lasttime $lru $lrusize $tooold);
%u = ();
$dbm = undef;
$lastoperinterval = 60*24*60*60;
$lasttime = 0;
$lrusize = 2000;
+$tooold = 86400 * 365; # this marks an old user who hasn't given enough info to be useful
# hash of valid elements and a simple prompt
%valid = (
my $count = 0;
my $err = 0;
+ my $del = 0;
my $fh = new IO::File ">$fn" or return "cannot open $fn ($!)";
if ($fh) {
my $key = 0;
}
my $ref = decode($val);
if ($ref) {
+ my $t = $ref->{lastin} || 0;
+ if ($main::systime > $t + $tooold) {
+ unless ($ref->{lat} && $ref->{long} || $ref->{qth} || $ref->{qra}) {
+ eval {$dbm->del($key)};
+ dbg(carp("Export Error2: $key\t$val\n$@")) if $@;
+ Log('DXCommand', "$ref->{call} deleted, too old");
+ $del++;
+ next;
+ }
+ }
+ # only store users that are reasonably active or have useful information
print $fh "$key\t" . $ref->encode . "\n";
++$count;
} else {
- Log('DXCommand', "Export Error2: $key\t$val");
+ Log('DXCommand', "Export Error3: $key\t$val");
eval {$dbm->del($key)};
- dbg(carp("Export Error2: $key\t$val\n$@")) if $@;
+ dbg(carp("Export Error3: $key\t$val\n$@")) if $@;
++$err;
}
}
$fh->close;
}
- return "$count Users $err Errors ('sh/log Export' for details)";
+ return "$count Users $del Deleted $err Errors ('sh/log Export' for details)";
}
#