🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #19223

Re: Modify RFC1036: add no cross-posting newsgroup

#19223
From: Russ Allbery
Date: Thu, 15 Feb 1996 00:00
76 lines
4366 bytes
[ Newsgroups narrowed to the only appropriate one, which I'm going to have
  to start reading again now.  Sigh.  E-mail copy to Tim in case he
  doesn't read news.software.readers. ]

In news.admin.misc, Russ Allbery <rra@cs.stanford.edu> writes:
> In news.admin.misc, Tim Skirvin <tskirvin@arh0062.urh.uiuc.edu> writes:
>> scheidell@fdma.com (Michael S. Scheidell) writes:
>>> Paul Phillips (paulp@nic.cerf.net) wrote:

>>>> /^Newsgroups: .*,/h:j

>>> it only works in rn,nn,trn,strn?

>> I wish it worked in nn.  Because of some of the speed enhancements,
>> killfiles in this reader only support group name (no wildcards), user
>> names (not email address, but it does allow some wildcard like stuff),
>> or a combination of the two, for varying time periods.

That's weird...looked like it allows regexp matches against subject or
author.  Am I missing something obvious (since I'm only reading the source
code and didn't bother reading the man page in depth), or are you using an
old version?

And are you using the cute hack to kill on group name that I think you
are?  :)

> If it can killfile on individual group names, it can killfile on commas.
> Hmm.  *This* newsreader even has source.

Okay, looks like it's definitely doable.  The main problem is that nn has
a really annoying (at least for this) format for Newsgroups headers in its
internal overview database.  While it passes the sender and subject line
around intact in its internal data structures, the list of newsgroups is
chopped up and processed long before the killfile has even a chance of
seeing it intact.  What we actually get to see is a table of group
numbers.

Keeping that in mind, there seems to be two ways to pull this off.  We
could try to keep the full newsgroups header around somewhere, which means
making the internal data structures larger for each article, requires
some major changes to parts of db.c, and would probably be a real pain
when we were dealing with nn's own database (as opposed to Xref lines from
XOVER).

The other way would be to allow the user to kill any article posted to
more than N groups, since that's what we really want anyway, and not try
to take on the larger and harder problem of regexp matches on Newsgroups
headers.  That would still mean adding another member to the
article_header, but it's a lot less work.  The annoying part of doing
things that way is that it requires some unaesthetic special casing of
killfile handling (the string for that killfile entry would actually be
the number of groups instead).  In other words, it's the sort of thing
that Ben Harrison would call a "HACK".  :)  (Of course, so is the ~ flag,
but I won't get into that....)

The rest of it looks fairly trivial, although a number of things need to
be changed.  A new flag for newsgroup match would have to be added, as
well as a new killfile letter and an entry in the prompt, but all of that
looks reasonably straightforward.  The killfile compiler and parser and
the print routines would also have to be taught about the new flag.  It
wouldn't be a small patch, but neither would it be that bad of a one to
do.

So has anyone who's actually used nn (unlike me) already done this, is it
planned for the near future, or should I keep this rattling around in the
back of my mind as something to play with at some point?

That was the first time I'd ever looked at the source to nn (or really
given it much thought at all).  Fairly clean and readable, much more so
than some other programs I've had to deal with.  It does, however, make
rather extensive use of gotos.  :)

-- 
Russ Allbery (rra@cs.stanford.edu)     http://www-leland.stanford.edu/~rra/

Technical Details
Message-ID: <qum91i4fxze.fsf@cyclone.Stanford.EDU>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <4dpsgc$v0n@insosf1.netins.net>

Show Full Headers
Complete Article Headers
Message-ID: <qum91i4fxze.fsf@cyclone.Stanford.EDU>
Subject: Re: Modify RFC1036: add no cross-posting newsgroup
Date: Thu, 15 Feb 1996 00:00:00 +0000
From: Russ Allbery <rra@cs.stanford.edu>
References: <4dpsgc$v0n@insosf1.netins.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 139503799
Sender: eagle@cyclone.Stanford.EDU
To: tskirvin@arh0062.urh.uiuc.edu
Organization: The Eyrie
Newsgroups: news.software.readers