-use vars qw($date $sfi $k $a $forecast @allowed @denied $fp $node $from);
-
-$fp = 0; # the DXLog fcb
-$date = 0; # the unix time of the WWV (notional)
-$sfi = 0; # the current SFI value
-$k = 0; # the current K value
-$a = 0; # the current A value
-$forecast = ""; # the current geomagnetic forecast
-$node = ""; # originating node
-$from = ""; # who this came from
-@allowed = (); # if present only these callsigns are regarded as valid WWV updators
-@denied = (); # if present ignore any wwv from these callsigns
-my $dirprefix = "$main::data/wwv";
-my $param = "$dirprefix/param";
+
+use vars qw($VERSION $BRANCH);
+$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
+$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
+use vars qw($date $sfi $k $a $r $forecast @allowed @denied $fp $node $from
+ $dirprefix $param
+ $duplth $dupage $filterdef);
+
+$fp = 0; # the DXLog fcb
+$date = 0; # the unix time of the WWV (notional)
+$sfi = 0; # the current SFI value
+$k = 0; # the current K value
+$a = 0; # the current A value
+$r = 0; # the current R value
+$forecast = ""; # the current geomagnetic forecast
+$node = ""; # originating node
+$from = ""; # who this came from
+@allowed = (); # if present only these callsigns are regarded as valid WWV updators
+@denied = (); # if present ignore any wwv from these callsigns
+$duplth = 20; # the length of text to use in the deduping
+$dupage = 12*3600; # the length of time to hold spot dups
+
+$dirprefix = "$main::data/wwv";
+$param = "$dirprefix/param";
+
+$filterdef = bless ([
+ # tag, sort, field, priv, special parser
+ ['by', 'c', 0],
+ ['origin', 'c', 1],
+ ['channel', 'c', 2],
+ ['by_dxcc', 'nc', 3],
+ ['by_itu', 'ni', 4],
+ ['by_zone', 'nz', 5],
+ ['origin_dxcc', 'nc', 6],
+ ['origin_itu', 'ni', 7],
+ ['origin_zone', 'nz', 8],
+ ], 'Filter::Cmd');