From dd0ddcd3ae2d605a2a1f549da0263fa99c44f92d Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 4 Sep 2000 16:00:55 +0000 Subject: [PATCH] made the censoring of PC10,11,12 optional with $censorpc = 0 --- Changes | 3 +++ perl/DXProt.pm | 35 +++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Changes b/Changes index 3a2a8759..830d3fd9 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +04Sep00======================================================================= +1. made PC10,11,12 badword checking dependant on a flag variable ($censorpc) +default = 0 (off). 02Sep00======================================================================= 1. fix a long standing talk bug to do with routing to specific nodes (t xxx > yyy .....) diff --git a/perl/DXProt.pm b/perl/DXProt.pm index cd731a21..60e0391f 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -34,7 +34,7 @@ use BadWords; use strict; use vars qw($me $pc11_max_age $pc23_max_age $last_hour %pings %rcmds - %nodehops @baddx $baddxfn + %nodehops @baddx $baddxfn $censorpc $allowzero $decode_dk0wcy $send_opernam @checklist); $me = undef; # the channel id for this cluster @@ -46,7 +46,7 @@ $last_hour = time; # last time I did an hourly periodic update %rcmds = (); # outstanding rcmd requests outbound %nodehops = (); # node specific hop control @baddx = (); # list of illegal spotted callsigns - +$censorpc = 0; # Do a BadWords::check on text fields and reject things $baddxfn = "$main::data/baddx.pl"; @@ -297,10 +297,12 @@ sub normal if ($pcno == 10) { # incoming talk # will we allow it at all? - my @bad; - if (@bad = BadWords::check($field[3])) { - dbg('chan', "Bad words: @bad, dropped" ); - return; + if ($censorpc) { + my @bad; + if (@bad = BadWords::check($field[3])) { + dbg('chan', "Bad words: @bad, dropped" ); + return; + } } # is it for me or one of mine? @@ -357,10 +359,12 @@ sub normal dbg('chan', "Duplicate Spot ignored\n"); return; } - my @bad; - if (@bad = BadWords::check($field[5])) { - dbg('chan', "Bad words: @bad, dropped" ); - return; + if ($censorpc) { + my @bad; + if (@bad = BadWords::check($field[5])) { + dbg('chan', "Bad words: @bad, dropped" ); + return; + } } my @spot = Spot::add($field[1], $field[2], $d, $field[5], $field[6], $field[7]); @@ -439,11 +443,14 @@ sub normal return; } - my @bad; - if (@bad = BadWords::check($field[3])) { - dbg('chan', "Bad words: @bad, dropped" ); - return; + if ($censorpc) { + my @bad; + if (@bad = BadWords::check($field[3])) { + dbg('chan', "Bad words: @bad, dropped" ); + return; + } } + if ($field[2] eq '*' || $field[2] eq $main::mycall) { # global ann filtering on INPUT -- 2.34.1