From ed6e4ea0bc9fccf50a6a6087dbcd68c8788165d3 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 18 Feb 2003 06:57:07 +0000 Subject: Move do_chainpings yes/no from pingd to Chain.pm Allow fromlines building to be disabled --- Echolot/Chain.pm | 4 +++- Echolot/Config.pm | 3 ++- Echolot/Fromlines.pm | 4 +++- Echolot/Tools.pm | 3 ++- doc/pingd.conf.pod | 8 ++++++++ pingd | 5 ++--- templates/echolot.html | 4 +++- 7 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Echolot/Chain.pm b/Echolot/Chain.pm index 1a380d7..c2c1f56 100644 --- a/Echolot/Chain.pm +++ b/Echolot/Chain.pm @@ -1,7 +1,7 @@ package Echolot::Chain; # (c) 2002 Peter Palfrader -# $Id: Chain.pm,v 1.9 2003/02/18 06:38:06 weasel Exp $ +# $Id: Chain.pm,v 1.10 2003/02/18 06:57:07 weasel Exp $ # =pod @@ -128,6 +128,8 @@ sub get_latest_key($$) { }; sub send_pings($;$$) { + return 1 unless Echolot::Config::get()->{'do_chainpings'}; + my ($scheduled_for, $which1, $which2) = @_; $which1 = '' unless defined $which1; diff --git a/Echolot/Config.pm b/Echolot/Config.pm index 4c887cd..70b7523 100644 --- a/Echolot/Config.pm +++ b/Echolot/Config.pm @@ -1,7 +1,7 @@ package Echolot::Config; # (c) 2002 Peter Palfrader -# $Id: Config.pm,v 1.59 2003/02/18 06:38:08 weasel Exp $ +# $Id: Config.pm,v 1.60 2003/02/18 06:57:07 weasel Exp $ # =pod @@ -81,6 +81,7 @@ sub init($) { separate_rlists => 0, combined_list => 0, thesaurus => 1, + fromlines => 1, stats_sort_by_latency => 0, # Timers and Counters diff --git a/Echolot/Fromlines.pm b/Echolot/Fromlines.pm index cbb59a0..da414e5 100644 --- a/Echolot/Fromlines.pm +++ b/Echolot/Fromlines.pm @@ -1,7 +1,7 @@ package Echolot::Fromlines; # (c) 2002 Peter Palfrader -# $Id: Fromlines.pm,v 1.1 2003/02/18 06:41:52 weasel Exp $ +# $Id: Fromlines.pm,v 1.2 2003/02/18 06:57:07 weasel Exp $ # =pod @@ -23,6 +23,8 @@ use Echolot::Log; sub build_fromlines() { + return 1 unless Echolot::Config::get()->{'fromlines'}; + my $data; my @remailers = Echolot::Globals::get()->{'storage'}->get_remailers(); diff --git a/Echolot/Tools.pm b/Echolot/Tools.pm index 9643d78..4531dba 100644 --- a/Echolot/Tools.pm +++ b/Echolot/Tools.pm @@ -1,7 +1,7 @@ package Echolot::Tools; # (c) 2002 Peter Palfrader -# $Id: Tools.pm,v 1.19 2003/02/18 06:38:09 weasel Exp $ +# $Id: Tools.pm,v 1.20 2003/02/18 06:57:07 weasel Exp $ # =pod @@ -230,6 +230,7 @@ sub write_HTML_file($$;$%) { $template->param ( separate_rlist => Echolot::Config::get()->{'separate_rlists'} ); $template->param ( combined_list => Echolot::Config::get()->{'combined_list'} ); $template->param ( thesaurus => Echolot::Config::get()->{'thesaurus'} ); + $template->param ( fromlines => Echolot::Config::get()->{'fromlines'} ); $template->param ( version => Echolot::Globals::get()->{'version'} ); $template->param ( expires => date822( time + $expire )); diff --git a/doc/pingd.conf.pod b/doc/pingd.conf.pod index 65fcfd8..99a2fd0 100644 --- a/doc/pingd.conf.pod +++ b/doc/pingd.conf.pod @@ -203,6 +203,14 @@ Collect Thesaurus data and build Thesaurus Index. Default: 'thesaurus' => 1, Example: 'thesaurus' => 0, +=item B [bool] + +Build a summary of default From: header lines and list +remailers which allow overriding them. + + Default: 'fromlines' => 1, + Example: 'fromlines' => 0, + =item B In the statistics output remailers are sorted by reliability as the primary key. diff --git a/pingd b/pingd index e276e0b..1c3c3f6 100755 --- a/pingd +++ b/pingd @@ -3,7 +3,7 @@ $| = 1; # (c) 2002, 2003 Peter Palfrader -# $Id: pingd,v 1.98 2003/02/18 06:38:06 weasel Exp $ +# $Id: pingd,v 1.99 2003/02/18 06:57:07 weasel Exp $ # =pod @@ -509,8 +509,7 @@ sub daemon_run($) { $scheduler->add('processmail' , Echolot::Config::get()->{'processmail'} , 0, \&Echolot::Mailin::process ); $scheduler->add('ping' , Echolot::Config::get()->{'pinger_interval'} , 0, \&Echolot::Pinger::send_pings ); - $scheduler->add('chainping' , Echolot::Config::get()->{'chainpinger_interval'} , 0, \&Echolot::Chain::send_pings ) - if Echolot::Config::get()->{'do_chainpings'}; + $scheduler->add('chainping' , Echolot::Config::get()->{'chainpinger_interval'} , 0, \&Echolot::Chain::send_pings ); $scheduler->add('buildstats' , Echolot::Config::get()->{'buildstats'} , 0, \&Echolot::Stats::build_stats ); $scheduler->add('buildkeys' , Echolot::Config::get()->{'buildkeys'} , 0, \&Echolot::Stats::build_keys ); $scheduler->add('buildthesaurus' , Echolot::Config::get()->{'buildthesaurus'} , 0, \&Echolot::Thesaurus::build_thesaurus ); diff --git a/templates/echolot.html b/templates/echolot.html index fbde4b6..bbad390 100644 --- a/templates/echolot.html +++ b/templates/echolot.html @@ -3,7 +3,7 @@ Remailer Reliability Stats [<TMPL_VAR NAME="SITE_NAME">] "> - +

Remailer Reliability Stats []

@@ -122,10 +122,12 @@ over 98.0% in terms of overall reliability. Find the Thesaurus index in thesaurus/. +

From Header Lines

A summary of From Headers each remailer uses has also been compiled. It also lists which remailers allow setting the From: Header. +

Created by Echolot