Deutsch English Français Italiano |
<tdi4ud$af0$1@shakotay.alphanet.ch> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail From: Marc SCHAEFER <schaefer@alphanet.ch> Newsgroups: fr.comp.usenet.serveurs Subject: Re: Ratio nombre de lignes de citation / nombre de lignes de =?ISO-8859-1?Q?r=E9ponse?= Date: Wed, 17 Aug 2022 07:21:49 -0000 (UTC) Organization: Posted through news.alphanet.ch Message-ID: <tdi4ud$af0$1@shakotay.alphanet.ch> References: <tda5os$1n3$1@ns507557.dodin.fr.nf> <62f8caaa$0$22066$426a34cc@news.free.fr> <62f94176$0$9137$426a74cc@news.free.fr> <tdbivp$dvd$1@shakotay.alphanet.ch> <tdg960$4s8$1@shakotay.alphanet.ch> <tdgdfh$i0d$1@ns507557.dodin.fr.nf> <tdgffo$vmi$1@shakotay.alphanet.ch> <tdgftk$27h$1@shakotay.alphanet.ch> <tdgg2v$iel$1@ns507557.dodin.fr.nf> <tdgmrs$t5g$1@shakotay.alphanet.ch> <tdgnlt$kia$1@ns507557.dodin.fr.nf> <tdgvmo$va5$1@shakotay.alphanet.ch> <tdi1sh$uu5$1@ns507557.dodin.fr.nf> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 17 Aug 2022 07:21:49 -0000 (UTC) Injection-Info: shakotay.alphanet.ch; posting-account="schaefer"; logging-data="10720"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch" User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-21-amd64 (x86_64)) Cancel-Lock: sha256:fCYjR9/BQcoC6aYbr3LqNt+MV1evK6lFIbDFCVb34ro= sha256:0NQU3U47HlKYm2Ha/7IVE9SOfhHx4i2UtGv6lrnT8NI= Bytes: 2513 Lines: 34 jdd <jdd@dodin.org> wrote: > Le 16/08/2022 à 22:46, M.V. a écrit : > donc ce qui suit est à copier dans filter_nnrpd.pl ? La config est globale, donc au début du fichier. Le code: > 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"; > } > } est à mettre dans la fonction filter_post et ceci où tu veux en dehors des fonctions: > 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); > }