]> dxcluster.net Git - spider.git/commitdiff
limited the length of announces that are views for deduping
authordjk <djk>
Wed, 20 Oct 1999 10:17:58 +0000 (10:17 +0000)
committerdjk <djk>
Wed, 20 Oct 1999 10:17:58 +0000 (10:17 +0000)
Changes
perl/DXProt.pm

diff --git a/Changes b/Changes
index 06b5c67ffba69e30a72996a5f0b9e53203b59d88..c415b6069f304032ebebc42e418bd7e937d30841 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,7 @@
 20Oct99=======================================================================
 1. Translated all the subroutines of minimuf into perl as Minimuf.pm
+2. Limited the length of an ANN that is saved for de-duping to $pc12_dup_lth
+(def 72)
 18Oct99=======================================================================
 1. changed help command so that it works correctly with multiple title lines.
 2. added to address to the list of things a message checks to see whether it
index 5211b7aa622ec6553084b3371925bd0919d8405a..11d37f259f473f1c3a01f7568bd1698a68f7012f 100644 (file)
@@ -31,14 +31,15 @@ use strict;
 use vars qw($me $pc11_max_age $pc23_max_age $pc11_dup_age $pc23_dup_age
                        %spotdup %wwvdup $last_hour %pings %rcmds
                        %nodehops @baddx $baddxfn $pc12_dup_age
-                       %anndup $allowzero);
+                       %anndup $allowzero, $pc12_dup_lth);
 
 $me = undef;                                   # the channel id for this cluster
 $pc11_max_age = 1*3600;                        # the maximum age for an incoming 'real-time' pc11
 $pc23_max_age = 1*3600;                        # the maximum age for an incoming 'real-time' pc23
 $pc11_dup_age = 24*3600;               # the maximum time to keep the spot dup list for
 $pc23_dup_age = 24*3600;               # the maximum time to keep the wwv dup list for
-$pc12_dup_age = 24*3600;               # the maximum time to keep the ann dup list for
+$pc12_dup_age = 12*3600;               # the maximum time to keep the ann dup list for
+$pc12_dup_lth = 72;                            # the length of ANN text to save for deduping 
 %spotdup = ();                             # the pc11 and 26 dup hash 
 %wwvdup = ();                              # the pc23 and 27 dup hash
 %anndup = ();                               # the PC12 dup hash
@@ -260,8 +261,8 @@ sub normal
                }
                
                if ($pcno == 12) {              # announces
-                       # announce duplicate checking
-                       my $text = uc unpad($field[3]);
+                       # announce duplicate checking
+                       my $text = substr(uc unpad($field[3]), 0, $pc12_dup_lth);
                        my $dupkey = $field[1].$field[2].$text.$field[4].$field[6];
                        if ($anndup{$dupkey}) {
                                dbg('chan', "Duplicate Announce ignored\n");