🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Jeffrey M. Vinocur Sat, 09 Nov 2002 18:40
Cleanfeed supersedes filter patch
#61890
Author: Jeffrey M. Vinocur
Date: Sat, 09 Nov 2002 18:40
50 lines
2653 bytes
[ Marco, I'm assuming you read stuff posted here; if you prefer I
  CC you on this sort of thing let me know. ]

I found that the Cleanfeed "excessive supersedes" filter was
being a bit too harsh on certain FAQ-like posts not crossposted
to news.answers.  Thus the below adds a check on the Subject line
as well, provided there is no References.  I haven't tested it
yet, but the idea is sound even if I turn out to have done
something dumb in the code.

I have "faq_subjects => 'status report|[Ii]nformation'," in
cleanfeed.local %config.append, but those may not be right for
everyone.


@@ -171,6 +171,7 @@
 		'|^alt\.(?:support|teens|answers)',
 
 	faq_groups => '\.answers$|^news\.announce\.newgroups$',
+	faq_subjects => 'FAQ|[Ff]requently [Aa]sked [Qq]uestions',
 
 	# used to form domain names for filtering - depreciated!
 	badguys => 'ilovefreesex|moneyvue|backdoor|portlandplace|cure-impotency'.
@@ -225,7 +226,8 @@
 					allexclude html_allowed low_xpost_groups no_cancel_groups
 					baddomainpat phl_exempt supersedes_exempt
 					refuse_messageids net_abuse_groups spam_report_groups
-					adult_groups not_adult_groups faq_groups badguys)) {
+					adult_groups not_adult_groups faq_groups faq_subjects
+					badguys)) {
 				if (defined $config_append{$_}) {
 					$config{$_} .= "|$config_append{$_}";
 					$config{$_} =~ s/\|\|/\|/g;
@@ -482,6 +484,9 @@
 	# If all newsgroups are excluded from filtering, bail now
 	return '' if $gr{skip};
 
+	$gr{faq}++ if not $hdr{'References'}
+				  and $hdr{'Subject'} =~ /$config{faq_subjects}/o;
+
 	foreach (@Restricted_List) {
 		$gr{'rg_'.$_.'_only'} = ($gr{'rg_'.$_} == scalar @groups);
 	}



-- 
Jeffrey M. Vinocur
jeff@litech.org
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads