Liste des Groupes | Revenir à fcu serveurs |
my %config = (checkincludedtext => 1,
includedcutoff => 40,
includedratio => 0.6,
quotere => '^[>:]',
antiquotere => '^[<]', # so as not to reject dict(1)
output
);
if ($config{checkincludedtext}) {--
my ($lines, $quoted, $antiquoted) = analyze($body);
if ($lines > $config{includedcutoff}
&& $quoted - $antiquoted > $lines *
$config{includedratio}) {
$rval = "Article contains too much quoted text";
}
}
sub analyze {
my ($lines, $quoted, $antiquoted) = (0, 0, 0);
local $_ = shift;
do {
if ( /\G$config{quotere}/mgc ) {
$quoted++;
} elsif ( /\G$config{antiquotere}/mgc ) {
$antiquoted++;
}
} while ( /\G(.*)\n/gc && ++$lines );
return ($lines, $quoted, $antiquoted);
}
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Les messages affichés proviennent d'usenet.