[news.admin] Unofficial Re^n Patch for B News 2.11

tneff@bfmny0.UU.NET (Tom Neff) (09/13/89)

While y'all are in the mood to patch B news -- the following is an
UNOFFICIAL patch which has been shown to, but not approved by, some
kindly net.folks in the past week, and which seems to work on the
three sites I've installed it on.

It watches for incoming articles whose Subject: lines are of the
form Re^.* and translates them to Re: before storing or re-queueing.
The effect is to correct NN's rude behavior without inundating people
with email or unnecessarily junking articles.

The behavior is controlled via an additional preprocessor flag, ZAPNNRE.

--- cut here --- cut here --- cut here --- cut here --- cut here ---

*** defs.dist.old	Thu Sep 7 08:56:14 1989
--- defs.dist	Thu Sep 7 08:57:07 1989
***************
*** 62,67 ****
--- 62,68 ----
  #define V7MAIL			/* Local mail format is V7 ("From ")	*/
  #define SORTACTIVE		/* if you want news presented in the order of the .newsrc */
  #define ZAPNOTES		/* if you want old style notes headers moved into the headers */
+ #define ZAPNNRE			/* if you want to fix bad "Re^n:" subjects */
  #define DIGPAGE			/* allow digestifying in vnews */
  #define DOXREFS		/* Generate xref line for rn to use */
  /* #define MULTICAST		/* If you want to be able to multicast news */
*** inews.c.old	Thu Sep 7 08:41:14 1989
--- inews.c	Thu Sep 7 08:58:45 1989
***************
*** 1000,1005 ****
--- 1000,1016 ----
  	}
  #endif	/* ZAPNOTES */
  
+ #ifdef ZAPNNRE
+ 	if (STRNCMP(header.title, "Re^", 3) == 0) {
+ 		char *src, *dest;
+ 		logerr("Bad NN Re^n: subject line, fixing");
+ 
+ 		dest=header.title+2;
+ 		for (src=dest; *src != ':' && *src != '\0'; src++);
+ 		do { *dest++ = *src; } while (*src++ != '\0');
+ 	}
+ #endif	/* ZAPNNRE */
+ 
  	if (time((time_t *)0) > (cgtdate(header.subdate) + HISTEXP) ){
  		logerr("Article too old, moved to junk");
  		if (localize("junk")) {

--- cut here --- cut here --- cut here --- cut here --- cut here ---
-- 
Annex Canada now!  We need the room,	\)	Tom Neff
    and who's going to stop us.		(\	tneff@bfmny0.UU.NET