🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #144088

Re: Kill Top Posters with slrn

#144088
From: You
Date: Tue, 24 Feb 2004 04:48
105 lines
4396 bytes
On Mon, 9 Feb 2004 18:01:43 +0000 (UTC), John Doe <fluffy@fed.up.of.spam.so.i.made.this.up> wrote:
> Any good way of killing top posters other than scoring individuals at
> -9999 ?

Not exactly what you are looking for, but tends to nail top posters by way of
their bad habit of including the entire reply post.  Still very basic and
missing quite a lot of features.  Needs an include statement and a seperate
file for storing offenders.

<source>
%
%	$Id: kf_overquote.sl,v 1.4 2003/12/13 15:40:02 joe Exp joe $
%	Filters out operators who leave in too many level of quoting
%
%	$Log: kf_overquote.sl,v $
%	Revision 1.4  2003/12/13 15:40:02  joe
%	Changed the kill file to an include line in the main file and a seperate file.
%
%	Revision 1.3  2003/09/23 03:22:09  joe
%	Streamlined the code.  Added an index the message.
%
%	Revision 1.2  2003/09/23 02:45:23  joe
%	Module now kills based on the percentage of quoting.
%
%	Revision 1.2  2003/09/14 03:38:54  joe
%	Added some information.
%


% 
variable my_quote_levels = ">:";
% set this to your filter file
variable my_kill_file = "/home/joe/.slrn/SCORE.kf_overquote";
% aet this to your kill score
variable my_score = "-15000";

% set this to the percentage of allowable quoting
variable my_percent = .60;

% misc variables
variable my_from, my_fp_killfile, my_line, my_check, my_test; 

%the function to ad the perp to the filter file
define add_to_filter ()
{
	% They have nothing we want to hear, grab the From header
	my_from = extract_displayed_article_header ("From");
	% open the filter file for reading and writing
	my_fp_killfile = fopen (my_kill_file, "r+");
	% set the checking variable to 0
	my_check = "0";
	% read each line till the end of the file
	while (-1 != fgets (&my_line, my_fp_killfile))
	{
		% reomve leading white space
		my_line = strtrim_beg (my_line);
		% check to see if their from line is already in the file
		if (0 != is_substr (my_line, my_from))
		{
			% it is so set the proper variable and kill the loop
			my_check = "1";
			break;
		} 
	}
	% check to see if we have a new filter
	if (my_check == "0")
	{
		% we do, so tell the op and then add the requisite lines to the filter file
		popup_window ("Added to filter for over-quoting.  Press Alt-k to reload filter", strcat (my_from, " with quoted index: ", string (my_test)));
		fputs ("[*]\n", my_fp_killfile);
		fputs (strcat ("Score: ", my_score, "\n"), my_fp_killfile);
		fputs (strcat ("\tFrom: ", my_from, "\n"),  my_fp_killfile);
	}
% close the filter file
fclose (my_fp_killfile);
}

define check_quoted_content ()
{
	variable my_quoted_lines= 0.0, my_unquoted_lines = 1.0;
	%find the qouted text
	while (re_search_article (strcat ("^ ?[", my_quote_levels, "]")))
	{
		my_quoted_lines++;
	}
	re_search_article_first (strcat ("^[^", my_quote_levels, "]"));
	while (re_search_article (strcat ("^[^", my_quote_levels, "]")))
	{
		my_unquoted_lines++;
	}
	my_test = my_quoted_lines / (my_quoted_lines + my_unquoted_lines);
	if (my_test > my_percent)
	{
		add_to_filter ();
	}
	%return the beginning of the article
	re_search_article_first (".");
}

% setup the hook call
() = register_hook ("read_article_hook", "check_quoted_content");
</source>


-- 
Technical Details
Message-ID: <slrnc3lltn.tku.spam@plaguesplace.dyndns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!sjc70.webusenet.com!news.usenetserver.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!d60-65-21-231.col.wideopenwest.COM!not-for-mail
References: <c08hu6$9tt$1@custnews.inweb.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <slrnc3lltn.tku.spam@plaguesplace.dyndns.org>
Subject: Re: Kill Top Posters with slrn
Date: Tue, 24 Feb 2004 04:48:55 +0000
From: You <spam@plaguesplace.dyndns.org>
References: <c08hu6$9tt$1@custnews.inweb.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!sjc70.webusenet.com!news.usenetserver.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!d60-65-21-231.col.wideopenwest.COM!not-for-mail
Newsgroups: news.software.readers
Lines: 105
Reply-To: spam@plaguesplace.dyndns.org
NNTP-Posting-Host: d60-65-21-231.col.wideopenwest.com (65.60.231.21)
X-Trace: news.uni-berlin.de 1077598135 52005689 I 65.60.231.21 ([98024])
X-newsgroup: news.software.readers
X-realname: John Doe
User-Agent: slrn/0.9.7.4 (Linux)