Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: ...!3.eu.feeder.erje.net!feeder.erje.net!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail From: Marc SCHAEFER 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: References: <62f8caaa$0$22066$426a34cc@news.free.fr> <62f94176$0$9137$426a74cc@news.free.fr> 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 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); > }