2 # Announce and Talk Handling routines
4 # Copyright (c) 2000 Dirk Koopman
18 use vars qw(%dup $duplth $dupage $filterdef);
20 $duplth = 60; # the length of text to use in the deduping
21 $dupage = 5*24*3600; # the length of time to hold spot dups
23 # tag, sort, field, priv, special parser
34 ['origin_dxcc', 'n', 10],
35 ['origin_itu', 'n', 11],
36 ['origin_itu', 'n', 12],
39 use vars qw($VERSION $BRANCH);
40 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
41 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
42 $main::build += $VERSION;
43 $main::branch += $BRANCH;
45 # enter the spot for dup checking and return true if it is already a dup
48 my ($call, $to, $text) = @_;
52 $text =~ s/[\\\%]\d+//g;
53 $text =~ s/[^a-zA-Z0-9]//g;
54 $text = substr($text, 0, $duplth) if length $text > $duplth;
55 my $dupkey = "A$to|\L$text";
56 return DXDupe::check($dupkey, $main::systime + $dupage);
61 return DXDupe::listdups('A', $dupage, @_);