🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
14 messages
14 total messages Started by Doug Sewell Mon, 29 Mar 1993 00:33
Re: tin 1.19 + inn1.4 + XOver?
#3594
Author: Doug Sewell
Date: Mon, 29 Mar 1993 00:33
40 lines
2488 bytes
Tom Limoncelli (tal@Warren.MENTORG.COM) wrote:

: >Can I install tin 1.19 to use Xover with inn1.3/1.4?  Anyone know how?

: xoverview is gross and the author refuses to add it to INN.
: xover is a part of the INN 1.4 distribution.  (it's party of 1.3
: too, but why would you want to install out-dated software?)

The current release of tin (1.1pl9) doesn't look like it actually uses
xoverview, and it doesn't use the xover command.

It's probably a bad idea, but I have fully implemented all of the tin
extensions for INN 1.4.  I'm waiting on FreePort patches from another site 
before I plunk it into production, but it appears to work when I run nnrpd 
from stdin.

With the patches I'll post, you will get:

xmotd	(news message-of-the-day)
xuser	(pass user identification info to the syslog)
xindex	(retrieve tin indexes)
xoverview	(deprecated, as Tom indicated.  If you don't like it then
		in the code I'll post then #undef XOVERVIEW in 1 file).
list subscriptions	(default subscription list).

It uses xuser.c, xmotd.c, xindex.c, and xoverview.c right out of the tin
distribution.  I had to make a change to tin's open.c, because it assumes
that no INN system would support xindex.  In INN the nnrpd files updated
were the Makefile, commands.c, and nnrpd.c.

Be aware that these patches aren't supported by Iain or Rich, and the next
version of tin will use XOVER directly.  We have other readers that I've
hacked some of these goodies into, so I'll probably keep them up a while.

Doug
-- 
Doug Sewell, Tech Support, Computer Center, Youngstown State University
doug@cc.ysu.edu	   doug@ysub.bitnet	<internet>!cc.ysu.edu!doug

uuencode bunny.dropping < core | mail jp@tygra.michigan.com
Re: tin 1.19 + inn1.4 + XOver?
#3601
Author: Rich Salz
Date: Mon, 29 Mar 1993 18:13
29 lines
1546 bytes
In <C4MK7F.J3n@news.ysu.edu> doug@cc.ysu.edu (Doug Sewell) writes:
>It's probably a bad idea, but I have fully implemented all of the tin
>extensions for INN 1.4.

>xmotd	(news message-of-the-day)

I don't like this command and will not support it.  Messages of the day
should appear in /etc/motd, /etc/issue, email, or the local.announce group. :-)

>xuser	(pass user identification info to the syslog)

I will not support this command because I think it adds no real information.
More importantly, since there is no access control it is anyone can, say
"I am the company president and I read alt.sex.sheep" with impugnity.

>xindex	(retrieve tin indexes)

I will not support this command because NOV exists.

>xoverview

I felt so strongly about this command that I issued a patch to the NNTP
reference implementation.  :-)  I will not support it.

>list subscriptions	(default subscription list).

This will appear in 1.5.

	/r$
Force user to read certain groups
#3615
Author: Alan Barrett
Date: Wed, 31 Mar 1993 06:04
29 lines
2076 bytes
In article <1pakha$35k@genesis.ait.psu.edu>,
barr@pop.psu.edu (David Barr) writes:
>	Hm.. I'm a personal fan of XMOTD.  [...]
> The only substitute would be a local.announce group (which we
> sort-of have, but not really for this sort of thing, unfortuately).
> The big concern is that there's lots of people who simply don't or
> won't read a .announce group often enough to be worthwhile.

Most existing newsreaders don't do XMOTD, and there are very few things
that you can do with XMOTD.  How do you avoid showing old news again,
for example?

If you are contemplating modifying your newsreader software to support
XMOTD, I believe that you would be better advised to modify your
newsreader software to force users to read the foolocal.announce
group.  While you're at it, force them to read news.announce.newusers
too.

> It would be really nice to have a place to put messages like "This
> news server will be down from XXX to YYY for backups on Sunday", or
> "We are now getting feeds of the podunk.* heirarchy" and "Our Clarinet
> feed will end this month because we have no money!"  :-)

The foolocal.announce group is the right place for this.  It would be
really nice if newsreader software supported it.

--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za
Re: Force user to read certain groups
#3613
Author: Alan Barrett
Date: Wed, 31 Mar 1993 06:08
11 lines
1195 bytes
In article <1pbca3$5b4@lucy.ee.und.ac.za>,
barrett@lucy.ee.und.ac.za (Alan Barrett) writes:
> The foolocal.announce group is the right place for this.  It would be
> really nice if newsreader software supported it.

It might be useful to have an NNTP extension to report a list of
newsgroups that the administrator thinks everyone should read.

--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za
Re: Force user to read certain groups
#3619
Author: Doug Sewell
Date: Wed, 31 Mar 1993 14:58
41 lines
2397 bytes
Alan Barrett (barrett@lucy.ee.und.ac.za) wrote:

: Most existing newsreaders don't do XMOTD, and there are very few things
: that you can do with XMOTD.  How do you avoid showing old news again,
: for example?

Given that only one current newsreader (tin) supports it, the source for the
extension is packaged with that newsreader, and that it requires modifying
news-server software to use it, I'm not surprised it's not popular.

The syntax of XMOTD is:

XMOTD yymmdd hhmmss [GMT]

where GMT is optional.  It's the same date format as NEWNEWS uses.

: If you are contemplating modifying your newsreader software to support
: XMOTD, I believe that you would be better advised to modify your
: newsreader software to force users to read the foolocal.announce
: group.  While you're at it, force them to read news.announce.newusers
: too.

That could be more of a challenge to implement correctly... particularly
if they kill-file authors or subjects, or catch-up the entire group in
one shot.

You want to prevent them from doing that ?  What about when they choose
that group on their own to check for new news ? 

While there's no guarantee that a brief multi-line "message of the day"
will be read, if they have to hit enter to make it go away and show the
articles there might have a chance.

: The foolocal.announce group is the right place for this.  It would be
: really nice if newsreader software supported it.

-- 
Doug Sewell, Tech Support, Computer Center, Youngstown State University
doug@cc.ysu.edu	   doug@ysub.bitnet	<internet>!cc.ysu.edu!doug

uuencode bunny.dropping < core | mail jp@tygra.michigan.com
Re: Force user to read certain groups
#3624
Author: Alan Barrett
Date: Wed, 31 Mar 1993 22:20
196 lines
6576 bytes
In article <1pbca3$5b4@lucy.ee.und.ac.za>, I wrote:
> If you are contemplating modifying your newsreader software to support
> XMOTD, I believe that you would be better advised to modify your
> newsreader software to force users to read the foolocal.announce
> group.  While you're at it, force them to read news.announce.newusers
> too.

Here's a patch for strn-0.8.4 to do some enforcement.  Compile with
-DENFORCE.  This is not very well designed or tested.  Something
similar might work in other versions of strn or trn.

The new force_early_subscription() function adds the specified group to
the newsrc, forces it to be subscribed, and moves it to the specified
location near the front of the newsrc.

The new setngtoforce() function adds a newsgroup to the enforcement
list, and calls force_early_subscription().

The existing initialise() function now calls setngtoforce() for each
group that the administrator chooses to add to the enforcement list.

The existing inlist() function now also checks if the group is in the
enforcement list.  This means that restricting newsgroups via the
command line or the 'a' or 'o' commands does not remove the enforced
groups from consideration.

The existing sg_use_file() function now adds the enforced groups to the
front of the top level menu in scangroup mode.

There is no way of removing an entry from the enforcement list, but the
user can manually unsubscribe or move the group to another place in the
newsrc.  Of course, next time the user runs trn, the enforcements will
be made again, so unsubscribing is rather pointless.

--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za

--- init.c.084	Wed Mar 31 22:01:32 1993
+++ init.c	Wed Mar 31 23:03:44 1993
@@ -170,6 +170,10 @@
     thread_init();
     util_init();
 
+    /* add some groups to the enforcement list */
+    setngtoforce("news.announce.newusers");
+    setngtoforce("news.announce.important");
+
 #ifdef NEWSFILTER
     if (!strEQ(getval("NCLIP","///"),"///")) {
 #ifdef SCORE
--- only.h.084	Wed Mar 31 22:03:16 1993
+++ only.h	Wed Mar 31 23:51:28 1993
@@ -24,13 +24,22 @@
 #   endif
 #endif
 
-EXT int maxngtodo INIT(0);			/*  0 => no restrictions */
+EXT int maxngtodo INIT(0);		/*  0 => no restrictions */
 					/* >0 => # of entries in ngtodo */
 
+#ifdef ENFORCE
+    EXT char *ngtoforce[NGMAX];		/* enforcements in effect */
+    EXT int maxngtoforce INIT(0);	/*  0 => no enforcements */
+					/* >0 => # of entries in ngtoforce */
+#endif
+
 void	only_init _((void));
-bool	inlist _((char*));	/* return TRUE if ngname is in command line list */
+bool	inlist _((char*));	/* return TRUE if ngname is in enforcement or restriction list */
 			/* or if there was no list */
-void	setngtodo _((char*));
+void	setngtodo _((char*));		/* add pattern to restriction list */
+#ifdef ENFORCE
+void	setngtoforce _((char*));	/* add group to enforcement list */
+#endif
 #ifdef ONLY
-void	end_only _((void));
+void	end_only _((void));		/* remove restrictions */
 #endif
--- only.c.084	Wed Mar 31 22:01:58 1993
+++ only.c	Wed Mar 31 23:49:22 1993
@@ -16,6 +16,7 @@
 #include "EXTERN.h"
 #include "common.h"
 #include "search.h"
+#include "rcstuff.h"
 #include "util.h"
 #include "final.h"
 #include "ngsrch.h"
@@ -28,6 +29,7 @@
     ;
 }
 
+/* add a pattern to the restriction list */
 void
 setngtodo(pat)
 char *pat;
@@ -60,6 +62,39 @@
 #endif
 }
 
+#ifdef ENFORCE
+/* Subscribe to a group and move it to near the head of the list. */
+static void
+force_early_subscription(ngnam,loc)
+char *ngnam;
+NG_NUM loc;
+{
+    NG_NUM ng;
+
+    ng = find_ng(ngnam);
+    if (ng == nextrcline) {		/* not in .newsrc? */
+	ng = add_newsgroup(ngnam, ':');
+    } else {				/* force subscription */
+	register char *cp = rcline[ng] + rcnums[ng];
+	rcchar[ng] = (*cp && cp[1] == '0' ? '0' : ':');
+    }
+    set_toread(ng);
+    ng = relocate_newsgroup(ng, loc);
+}
+
+/* add a group to the enforcement list */
+void
+setngtoforce(ngnam)
+char *ngnam;
+{
+    if (maxngtoforce < NGMAX) {
+	ngtoforce[maxngtoforce] = savestr(ngnam);
+	force_early_subscription(ngnam, (NG_NUM)maxngtoforce);
+	maxngtoforce++;
+    }
+}
+#endif /* ENFORCE */
+
 /* if command line list is non-null, is this newsgroup wanted? */
 
 bool
@@ -72,6 +107,12 @@
 
     if (maxngtodo == 0)
 	return TRUE;
+#ifdef ENFORCE
+    for (i=0; i<maxngtoforce; i++) {
+	if (strEQ(ngtoforce[i],ngnam))
+	    return TRUE;
+    }
+#endif
     for (i=0; i<maxngtodo; i++) {
 	if (execute(compextodo[i],ngnam))
 	    return TRUE;
@@ -83,6 +124,12 @@
 
     if (maxngtodo == 0)
 	return TRUE;
+#ifdef ENFORCE
+    for (i=0; i<maxngtoforce; i++) {
+	if (strEQ(ngtoforce[i],ngnam))
+	    return TRUE;
+    }
+#endif
     init_compex(&ilcompex);
     for (i=0; i<maxngtodo; i++) {
 	if ((s = ng_comp(&ilcompex,ngtodo[i],TRUE,TRUE)) != Nullch) {
--- sgfile.c.084	Wed Mar 31 23:43:22 1993
+++ sgfile.c	Thu Apr  1 00:01:48 1993
@@ -7,6 +7,7 @@
 /* trim the list */
 #include "EXTERN.h"
 #include "common.h"
+#include "only.h"
 #include "intrp.h"
 #include "search.h"
 #include "sgroup.h"
@@ -177,6 +178,19 @@
     (void)sg_new_context();
     sg_contexts[sg_num_contexts-1].title = savestr(title);
     sg_contexts[sg_num_contexts-1].filename = savestr(s);
+
+#ifdef ENFORCE
+    /* If this file is the top-level menu, start with the enforcement list */
+    if (sg_num_contexts == 1) {
+	int i, j;
+	NG_NUM ng;
+	for (i=0; i<maxngtoforce; i++) {
+	    ng = find_ng(ngtoforce[i]);
+	    j = sg_add_ent(1,ngtoforce[i]);
+	    sg_ents[j].groupnum = ng;
+	}
+    }
+#endif /* ENFORCE */
 
 /* Later considerations:
  * 1. Long lines

(end)
Re: Force user to read certain groups
#3623
Author: Iain Lea
Date: Wed, 31 Mar 1993 22:41
35 lines
2007 bytes
Alan Barrett (barrett@lucy.ee.und.ac.za) wrote:
:
: Most existing newsreaders don't do XMOTD, and there are very few things
: that you can do with XMOTD.

It is only designed to allow the admin to edit one file on the server which
all *news* clients will see. Its for short info. pertaining to the news
service.

: How do you avoid showing old news again, for example?

Format:  XMOTD date time [GMT]

Same format as NEWNEWS so nothing out of the ordinary there and easy to
code for.

: If you are contemplating modifying your newsreader software to support
: XMOTD, I believe that you would be better advised to modify your
: newsreader software to force users to read the foolocal.announce
: group.  

I tell what - you put a patch together to do this for the reader of your
choice and i'll make sure the readers author gets it. Seems fair to me.

: While you're at it, force them to read news.announce.newusers too.

Don't ever *force* anyone to do anything - people have funny ways of
reacting to such things.

Iain

--
NAMES  Iain Lea    Iain.Lea%anl433.uucp@Germany.EU.net
SNAIL  Siemens AG, ANL A433SZ, Gruendlacher Str. 248, 8510 Fuerth, Germany.
PHONE  +49-911-3089-407 (work) +49-911-331963 (home) +49-911-3089-290 (FAX)  
Re: XMOTD (was: Re: tin 1.19 + inn1.4 + XOver?)
#3635
Author: Robert Elz
Date: Thu, 01 Apr 1993 17:54
40 lines
2853 bytes
In <1pakha$35k@genesis.ait.psu.edu> barr@pop.psu.edu (David Barr) writes:

| The big concern is that there's lots of people who simply don't or
| won't read a .announce group often enough to be worthwhile.

It constantly amazes me that some system admin types believe that
the information they have to impart is so important that everyone
should be forced to read it, whether they want to or not.

Its perhaps even more amazing that anyone believes there's any way
to actually make this happen - sure you can arrange to print the
chars on the users' terminals, assuming the users don't just get
bored with this and use their own clients that supress the noise,
but even where the characters are displayed, people just mentally switch
it off - the same thing (more or less) appears all the time, and
is constantly ignored...

When was the last time anyone here actually read all the noise that
some recent ftp servers insist on displaying when you connect to them
after the first couple of times you connected?   It doesn't matter whether
the information changed since last time, its ignored all the same.
(This is not generally a problem to the ftp sites, as the main
purpose is often to get a message to people the first time they connect).

| It would
| be really nice to have a place to put messages like "This news server
| will be down from XXX to YYY for backups on Sunday", or "We are now
| getting feeds of the podunk.* heirarchy" and "Our Clarinet feed will
| end this month because we have no money!"  :-)

All this belongs in a newsgroup, if the people don't want to read it,
then they probably don't care whether your nntp server is occasionally
down out of normal hours, or that you're changing your newsfeeds.
If some group they care about goes away, they may then go look in the
announcement group to see if its been mentioned, if they don't want to
go look at the available information, that's their problem (and you
simply ignore messages about things that could have been discovered the
right way).

kre
Re: XMOTD (was: Re: tin 1.19 + inn1.4 + XOver?)
#3637
Author: Rich Salz
Date: Thu, 01 Apr 1993 18:24
7 lines
1010 bytes
While I agree with kre, I do have another reason why I don't like XMOTD:
You're willing to change newsreaders to support it, but not willing to
change them to "strongly suggest" that they read the "local.motd" group?
Seems inconsistent to me.

I will not add xmotd to INN.
	/r$
Re: tin 1.19 + inn1.4 + XOver?
#3648
Author: Owen Scott Medd
Date: Fri, 02 Apr 1993 02:40
15 lines
1368 bytes
Doug Sewell (doug@cc.ysu.edu) wrote:
: It's probably a bad idea, but I have fully implemented all of the tin
: extensions for INN 1.4.  I'm waiting on FreePort patches from another site 
: before I plunk it into production, but it appears to work when I run nnrpd 
: from stdin.

We're beta-testing patches to tin 1.19 to use xover if available.
If there is sufficient interest, we will make these available (not
supported, won't be what is in the next tin release, etc, etc).

Owen
--
USMail:   Msen, Inc., 628 Brooks Street, Ann Arbor, MI  48103
Phone:	  +1 313 998-4562	FAX:	+1 313 998-4563
Internet: osm@msen.com		UUCP:	...!widener!heifetz!osm
Re: tin 1.19 + inn1.4 + XOver?
#3649
Author: Iain Lea
Date: Fri, 02 Apr 1993 10:43
16 lines
1419 bytes
Owen Scott Medd (osm@garnet.msen.com) wrote:
:
: We're beta-testing patches to tin 1.19 to use xover if available.
: If there is sufficient interest, we will make these available (not
: supported, won't be what is in the next tin release, etc, etc).

Send the patch to me and if its well done. I may just use it to finish off
the last v1.1 patch. The xover work on v2.0 has barely begun so don't expect
anything from that corner any time soon.

Iain

--
NAMES  Iain Lea    Iain.Lea%anl433.uucp@Germany.EU.net
SNAIL  Siemens AG, ANL A433SZ, Gruendlacher Str. 248, 8510 Fuerth, Germany.
PHONE  +49-911-3089-407 (work) +49-911-331963 (home) +49-911-3089-290 (FAX)  
Re: Force user to read certain groups
#3790
Author: Alan Barrett
Date: Fri, 02 Apr 1993 17:09
298 lines
8621 bytes
In article <1pd5fa$956@lucy.ee.und.ac.za>, I wrote:
> Here's a patch for strn-0.8.4 to do some enforcement.

Here's an improved version.  You can set the FORCEGROUPS variable in
the site-wide STRNRC file or in the user's .strnrc file, or let it
default to the "news.announce.newusers,news.announce.important"
value in the source code.  I would be interested to hear from anybody
who tries this.

--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za

--- init.c.084	Wed Mar 31 22:01:32 1993
+++ init.c	Fri Apr  2 17:17:15 1993
@@ -170,6 +170,25 @@
     thread_init();
     util_init();
 
+#ifdef ENFORCE
+    /* Add some groups to the enforcement list.
+     * Set FORCEGROUPS to an empty string or to "," to disable enforcement.
+     */
+    {
+	char *s, *p, *q;
+
+	s = savestr(getval("FORCEGROUPS",
+			"news.announce.newusers,news.announce.important"));
+	/* walk the comma-list, calling setngtoforce() on each group */
+	for (p=s; p; p=q) {
+	    q = index(p, ',');
+	    if (q) { *q++ = '\0'; }
+	    if (*p) { setngtoforce(p); }
+	}
+	free(s);
+    }
+#endif
+
 #ifdef NEWSFILTER
     if (!strEQ(getval("NCLIP","///"),"///")) {
 #ifdef SCORE
--- only.c.084	Wed Mar 31 22:01:58 1993
+++ only.c	Fri Apr  2 18:16:51 1993
@@ -16,6 +16,7 @@
 #include "EXTERN.h"
 #include "common.h"
 #include "search.h"
+#include "rcstuff.h"
 #include "util.h"
 #include "final.h"
 #include "ngsrch.h"
@@ -28,6 +29,91 @@
     ;
 }
 
+#ifdef ENFORCE
+/* Subscribe to a group and move it to near the head of the list.
+ * Returns bool pass/fail status. */
+
+static bool
+force_early_subscription(ngnam,loc)
+char *ngnam;
+NG_NUM loc;
+{
+    NG_NUM ng;
+    enum {nothing, add, subscribe, move} what = nothing;
+    bool bogus;
+
+    /* add or subscribe, if necessary */
+    ng = find_ng(ngnam);
+    if (ng == nextrcline) {			/* not in .newsrc? */
+	ng = add_newsgroup(ngnam, ':');
+	what = add;
+    } else if (RCCHAR(rcchar[ng]) != ':') {	/* not subscribed? */
+	register char *cp = rcline[ng] + rcnums[ng];
+	rcchar[ng] = (*cp && cp[1] == '0' ? '0' : ':');
+	what = subscribe;
+    } else if (ng != loc) {			/* in wrong place? */
+	what = move;
+    } else {					/* nothing to do */
+	return TRUE;
+    }
+
+    /* check if it is bogus, and either undo earlier work or press on */
+    bogus = (getngsize(ng) < TR_NONE);
+    if (bogus) {
+	switch (what) {
+	case subscribe:
+	    rcchar[ng] = '!';
+	    break;
+	case add:
+	    nextrcline--;
+	    break;
+	}
+    } else {
+	set_toread(ng);
+	checkexpired(ng);
+	ng = relocate_newsgroup(ng, loc);
+    }
+
+#ifdef VERBOSE
+    if (verbose) {
+	if (bogus) {
+	    printf("Did not force subscription to bogus group %s\n", ngnam);
+	} else {
+	    switch (what) {
+	    case add:
+		printf("Forced addition of %s to .newsrc\n", ngnam);
+		break;
+	    case subscribe:
+		printf("Forced subscription to %s\n", ngnam);
+		break;
+	    case move:
+		printf("Forced %s to start of .newsrc\n", ngnam);
+		break;
+	    }
+	}
+    }
+#endif
+
+    return !bogus;
+}
+
+/* add a group to the enforcement list */
+
+void
+setngtoforce(ngnam)
+char *ngnam;
+{
+    if (maxngtoforce < NGMAX) {
+	ngtoforce[maxngtoforce] = savestr(ngnam);
+	if (force_early_subscription(ngnam, (NG_NUM)maxngtoforce)) {
+	    maxngtoforce++;
+	}
+    }
+}
+#endif /* ENFORCE */
+
+/* add a group pattern to the restriction list */
+
 void
 setngtodo(pat)
 char *pat;
@@ -60,10 +146,36 @@
 #endif
 }
 
-/* if command line list is non-null, is this newsgroup wanted? */
+/* is group wanted? */
 
 bool
 inlist(ngnam)
+char *ngnam;
+{
+    return (inforcelist(ngnam) || indolist(ngnam));
+}
+
+/* is group wanted by the enforcement list */
+
+bool
+inforcelist(ngnam)
+char *ngnam;
+{
+#ifdef ENFORCE
+    register int i;
+
+    for (i=0; i<maxngtoforce; i++) {
+	if (strEQ(ngtoforce[i],ngnam))
+	    return TRUE;
+    }
+#endif
+    return FALSE;
+}
+
+/* is group wanted by the restriction list */
+
+bool
+indolist(ngnam)
 char *ngnam;
 {
 #ifdef ONLY
--- only.h.084	Wed Mar 31 22:03:16 1993
+++ only.h	Thu Apr  1 14:39:45 1993
@@ -24,13 +24,24 @@
 #   endif
 #endif
 
-EXT int maxngtodo INIT(0);			/*  0 => no restrictions */
+EXT int maxngtodo INIT(0);		/*  0 => no restrictions */
 					/* >0 => # of entries in ngtodo */
 
+#ifdef ENFORCE
+    EXT char *ngtoforce[NGMAX];		/* enforcements in effect */
+    EXT int maxngtoforce INIT(0);	/*  0 => no enforcements */
+					/* >0 => # of entries in ngtoforce */
+#endif
+
 void	only_init _((void));
-bool	inlist _((char*));	/* return TRUE if ngname is in command line list */
+bool	inlist _((char*));	/* return TRUE if ngname is in enforcement or restriction list */
+bool	indolist _((char*));	/* return TRUE if ngname is in restriction list */
+bool	inforcelist _((char*));	/* return TRUE if ngname is in enforcement list */
 			/* or if there was no list */
-void	setngtodo _((char*));
+void	setngtodo _((char*));		/* add pattern to restriction list */
+#ifdef ENFORCE
+void	setngtoforce _((char*));	/* add group to enforcement list */
+#endif
 #ifdef ONLY
-void	end_only _((void));
+void	end_only _((void));		/* remove restrictions */
 #endif
--- rcstuff.c.084	Thu Mar 18 23:58:49 1993
+++ rcstuff.c	Fri Apr  2 18:22:01 1993
@@ -134,6 +134,7 @@
 	    toread[newng] = TR_UNSUB;
 	    continue;
 	}
+	/* XXX: should be able to detect duplicate lines */
 
 	/* now find out how much there is to read */
 
@@ -505,6 +506,8 @@
     ART_NUM tmpngmax;
     ART_NUM tmpabs1st;
     
+    if (ngx == newng)
+	return newng;			/* simple optimisation */
 #ifdef SCAN
     sg_changed_newsrc = TRUE;
 #endif
@@ -883,7 +886,7 @@
 {
     if (data->dat_len == nextrcline-1)
 	data->dat_len = ngnum;
-    else if (data->dat_len > ngnum)
+    else if (data->dat_len >= ngnum)
 	data->dat_len++;
 }
 #endif
--- sgfile.c.084	Wed Mar 31 23:43:22 1993
+++ sgfile.c	Thu Apr  1 00:01:48 1993
@@ -7,6 +7,7 @@
 /* trim the list */
 #include "EXTERN.h"
 #include "common.h"
+#include "only.h"
 #include "intrp.h"
 #include "search.h"
 #include "sgroup.h"
@@ -177,6 +178,19 @@
     (void)sg_new_context();
     sg_contexts[sg_num_contexts-1].title = savestr(title);
     sg_contexts[sg_num_contexts-1].filename = savestr(s);
+
+#ifdef ENFORCE
+    /* If this file is the top-level menu, start with the enforcement list */
+    if (sg_num_contexts == 1) {
+	int i, j;
+	NG_NUM ng;
+	for (i=0; i<maxngtoforce; i++) {
+	    ng = find_ng(ngtoforce[i]);
+	    j = sg_add_ent(1,ngtoforce[i]);
+	    sg_ents[j].groupnum = ng;
+	}
+    }
+#endif /* ENFORCE */
 
 /* Later considerations:
  * 1. Long lines
--- trn.c.084	Thu Apr  1 14:35:46 1993
+++ trn.c	Thu Apr  1 14:47:25 1993
@@ -165,12 +165,14 @@
 		    }
 #endif
 		} else {
-		    bool shoe_fits;	/* newsgroup matches restriction? */
+		    bool shoe_fits;		/* newsgroup wanted or forced? */
+		    bool shoe_really_fits;	/* newsgroup matches restriction? */
 
 		    mode = 'n';
 		    if (toread[ng] >= TR_NONE) {	/* recalc toread? */
 			set_ngname(rcline[ng]);
-			shoe_fits = inlist(ngname);
+			shoe_really_fits = indolist(ngname);
+			shoe_fits = (shoe_really_fits || inforcelist(ngname));
 			if (shoe_fits)
 			    set_toread(ng);
 			if (paranoid) {
@@ -183,7 +185,7 @@
 			}
 		    }
 		    if (toread[ng] < (maxngtodo||special ? TR_NONE : TR_ONE)
-		     || !shoe_fits) {		/* unwanted newsgroup? */
+		     || !shoe_really_fits) {	/* unwanted newsgroup? */
 			ng += direction;	/* then skip it */
 			if (ng < 0) {
 			   ng = 1;
Re: Force user to read certain groups
#3702
Author: Matthias Urlichs
Date: Wed, 07 Apr 1993 15:00
21 lines
1734 bytes
In news.software.nntp, article <1pd5fa$956@lucy.ee.und.ac.za>,
  barrett@lucy.ee.und.ac.za (Alan Barrett) writes:
> 
> Here's a patch for strn-0.8.4 to do some enforcement.  Compile with
> -DENFORCE.  This is not very well designed or tested.  Something
> similar might work in other versions of strn or trn.
> 
I'd rather have a "list mandatory" extension to the server which reports
the newsgroups the reader isn't allowed to unsubscribe. 

Compiling this list into netnews is _ugly_ and reminds me of the time I
configured a vendor-supplied News system on a Unix box which refused to run
unless the newsgroup mod.announce.important (or whatever) was present.
Needless to say, this was quite a few years after the Great Renaming.

-- 
Better to kill time than have it kill you.
		-- karl
-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
Re: Force user to read certain groups
#3714
Author: Alan Barrett
Date: Thu, 08 Apr 1993 09:24
26 lines
2084 bytes
In article <1puq9s$nv9@smurf.sub.org>,
urlichs@smurf.sub.org (Matthias Urlichs) writes:
> I'd rather have a "list mandatory" extension to the server which reports
> the newsgroups the reader isn't allowed to unsubscribe. 
> Compiling this list into netnews is _ugly_

My current opinion is that a list of mandatory subscriptions provided
by the NNTP server should be merged with a list provided by a
configuration file at the reader side.  Of course, the reader software
should ignore any bogus groups in the merged list.  As a user, I would
also want a way of overriding the enforcement list configured by the
administrators.

I posted a revised version of my patch (only to news.software.readers)
that deals much better with all of this except for the proposed NNTP
extension.  I have since added "list forcegroups" to my copy of INN,
and taught my copy of strn to use it.  If the FORCEGROUPS variable is
not defined in the environment, the site-wide STRNRC file or the user's
.strnrc file then the compiled-in default is
"NNTP list forcegroups,news.announce.newusers,news.announce.important".
It ignores any duplicates and warns about any bogus groups in the
enforcement list.

--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads