Article View: news.software.nntp
Article #8330Re: patch to innd to screen wide crossposts
From: Eric Pettersen
Date: Thu, 06 Jun 1996 00:00
Date: Thu, 06 Jun 1996 00:00
76 lines
3892 bytes
3892 bytes
pett@cgl.ucsf.edu (Eric Pettersen) wrote:
> Using an idea suggested to me by Jason Fesler in e-mail, the patch would
> then be:
Post in haste, repent at leisure. The comparison test in the patch is
bass ackwards. They should be !strstr(... instead of strstr(... . The
corrected patch:
*** art.c.orig Wed Jun 05 13:42:43 1996
--- art.c Thu Jun 06 12:33:47 1996
***************
*** 1680,1685 ****
--- 1680,1686 ----
BOOL CrossPosted;
BOOL ToGroup;
BOOL GroupMissing;
+ BOOL OverCrossposted;
BUFFER *article;
char linkname[SPOOLNAMEBUFF];
char **groups;
***************
*** 1902,1912 ****
* If ngp == GroupPointers, then all the new articles newsgroups are
* "j" entries in the active file. In that case, we have to file it
* under junk so that downstream feeds can get it. */
! if (!Accepted || ngptr == GroupPointers) {
! if (!Accepted) {
! (void)sprintf(buff, "%d Unwanted newsgroup \"%s\"",
! NNTP_REJECTIT_VAL,
! MaxLength(HDR(_newsgroups), HDR(_newsgroups)));
ARTlog(&Data, ART_REJECT, buff);
#if defined(DONT_WANT_TRASH)
#if defined(DO_REMEMBER_TRASH)
--- 1903,1923 ----
* If ngp == GroupPointers, then all the new articles newsgroups are
* "j" entries in the active file. In that case, we have to file it
* under junk so that downstream feeds can get it. */
! #define MAX_CROSSPOST 25
! OverCrossposted = Data.Groupcount > MAX_CROSSPOST
! && !strstr(".announce",HDR(_newsgroups))
! && !strstr(".answers",HDR(_newsgroups));
! if (!Accepted || OverCrossposted || ngptr == GroupPointers){
! if (!Accepted || OverCrossposted) {
! if (!Accepted)
! (void)sprintf(buff, "%d Unwanted newsgroup \"%s\"",
! NNTP_REJECTIT_VAL,
! MaxLength(HDR(_newsgroups), HDR(_newsgroups)));
! else
! (void)sprintf(buff,
! "%d Unwanted large crosspost \"%s\" (%d groups)",
! NNTP_REJECTIT_VAL, MaxLength(HDR(_subject),
HDR(_subject)),
! Data.Groupcount);
ARTlog(&Data, ART_REJECT, buff);
#if defined(DONT_WANT_TRASH)
#if defined(DO_REMEMBER_TRASH)
***************
*** 1924,1930 ****
* we should throw the article away: if you have define
* DO_WANT_TRASH, then you want all trash except that which
* you explicitly excluded in your active file. */
! if (!GroupMissing) {
if (distributions)
DISPOSE(distributions);
ARTreject(buff, article);
--- 1935,1941 ----
* we should throw the article away: if you have define
* DO_WANT_TRASH, then you want all trash except that which
* you explicitly excluded in your active file. */
! if (!GroupMissing || OverCrossposted) {
if (distributions)
DISPOSE(distributions);
ARTreject(buff, article);
Technical Details
Message-ID:
<4p7fs0$1ci@cgl.ucsf.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<4p4s4t$oa2@cgl.ucsf.edu> <4p5fuu$ir0@augusta.math.psu.edu> <4p78rg$pno@cgl.ucsf.edu>Show Full Headers
Complete Article Headers
Message-ID: <4p7fs0$1ci@cgl.ucsf.edu> Subject: Re: patch to innd to screen wide crossposts Date: Thu, 06 Jun 1996 00:00:00 +0000 From: pett@cgl.ucsf.edu (Eric Pettersen) References: <4p4s4t$oa2@cgl.ucsf.edu> <4p5fuu$ir0@augusta.math.psu.edu> <4p78rg$pno@cgl.ucsf.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 158839811 Distribution: inet Organization: UCSF Computer Graphics Lab Newsgroups: news.software.nntp,news.software.b