diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-09-04 01:47:01 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-09-04 01:47:01 +0000 |
commit | 18d1ec2cf6a7a2b610d7c9b88b24ecd3839c7981 (patch) | |
tree | 428dd0f49b665163a7900ca6131b6df68bee1636 /Echolot/Stats.pm | |
parent | 6ebd214a5ff027266f1582bf749aa639cf59b8f0 (diff) |
Write total number of unique remailers to echolot.html
Work around broken remailers that insert newlines.
Diffstat (limited to 'Echolot/Stats.pm')
-rw-r--r-- | Echolot/Stats.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Echolot/Stats.pm b/Echolot/Stats.pm index 82bef86..9b8ae81 100644 --- a/Echolot/Stats.pm +++ b/Echolot/Stats.pm @@ -1,7 +1,7 @@ package Echolot::Stats; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Stats.pm,v 1.31 2002/08/23 08:17:21 weasel Exp $ +# $Id: Stats.pm,v 1.32 2002/09/04 01:47:01 weasel Exp $ # =pod @@ -481,6 +481,7 @@ sub build_lists() { my $pubrems; my %stats; + my %addresses; my $broken1 = read_file( Echolot::Config::get()->{'broken1'}, 1); my $broken2 = read_file( Echolot::Config::get()->{'broken2'}, 1); @@ -494,6 +495,7 @@ sub build_lists() { build_list2( $pubrems, $broken1, $broken2, $sameop, Echolot::Config::get()->{'resultdir'}.'/'.'mlist2', Echolot::Config::get()->{'templates'}->{'mlist2'}); $stats{'mix_total'} = scalar @$pubrems; $stats{'mix_98'} = scalar grep { $_->{'stats'}->{'avr_reliability'} >= 0.98 } @$pubrems; + $addresses{$_->{'address'}}=1 for @$pubrems; if (Echolot::Config::get()->{'combined_list'}) { $clist->{'mix'} = $rems; $pubclist->{'mix'} = $pubrems; $pubrems = undef; @@ -507,6 +509,7 @@ sub build_lists() { build_list2( $pubrems, $broken1, $broken2, $sameop, Echolot::Config::get()->{'resultdir'}.'/'.'rlist2', Echolot::Config::get()->{'templates'}->{'rlist2'}); $stats{'cpunk_total'} = scalar @$pubrems; $stats{'cpunk_98'} = scalar grep { $_->{'stats'}->{'avr_reliability'} >= 0.98 } @$pubrems; + $addresses{$_->{'address'}}=1 for @$pubrems; if (Echolot::Config::get()->{'combined_list'} && ! Echolot::Config::get()->{'seperate_rlists'}) { $clist->{'cpunk'} = $rems; $pubclist->{'cpunk'} = $pubrems; $pubrems = undef; @@ -551,6 +554,7 @@ sub build_lists() { build_clist( $pubclist, $broken1, $broken2, $sameop, Echolot::Config::get()->{'resultdir'}.'/'.'clist', Echolot::Config::get()->{'templates'}->{'clist'}); }; + $stats{'unique_addresses'} = scalar keys %addresses; Echolot::Tools::write_HTML_file( Echolot::Config::get()->{'resultdir'}.'/'.Echolot::Config::get()->{'indexfilebasename'}, Echolot::Config::get()->{'templates'}->{'indexfile'}, |