🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #47183

Re: Problem with control messages

#47183
From: Andreas Barth
Date: Thu, 29 Jun 2000 00:00
84 lines
3723 bytes
On Wed, 28 Jun 2000 14:05:50 +0200, Antonio Coloma wrote:
> The newsgroup description is not changed.
> Does anybody know how to change newsgroup description with control
> messages?

If you use controlchan, you can use the following "hot fix":


From: aba@muenchen.pro-bahn.de (Andreas Barth)
Message-Id: <slrn7velrm.dak.aba@aphrodite.muenchen.pro-bahn.de>
Newsgroups: news.admin.technical
Subject: Re: tagline change w/o status change
References: <slrn7vabl6.dak.aba@aphrodite.muenchen.pro-bahn.de> <yliu4pnlhe.fsf@windlord.stanford.edu>
Followup-To: 

On Sun, 3 Oct 1999 04:00:02 GMT, Russ Allbery <rra@stanford.edu> wrote:
>> And: Is this considered as a feature or a bug?
> Missing feature, really.

Ok. So it's ok to produce a patch for this. The diff is done
again the newgroup.pl from controlchan that's running here (
| # $Id: newgroup.pl,v 1.7 1998/10/06 14:36:32 news Exp $
), but should work also with newer ones.

--->---
--- newgroup.pl	Sun Oct  3 14:51:21 1999
+++ /usr/lib/news/bin/control/newgroup.pl	Sun Oct  3 15:04:45 1999
@@ -114,7 +114,7 @@
       } elsif (($oldgroup[3] ne "m") && ($modflag eq "moderated")) {
 	$status = "made moderated";
       } else {
-	$status = "no change";
+	$status = "tagline change";
       }
     } elsif (! $approved) {
       $status = "unapproved";
@@ -122,14 +122,20 @@
       $status = "created";
     }
     
-    if ($action eq "mail" && ($status !~ /(no change|unapproved)/)) {
+    if ($action eq "mail" && ($status !~ /unapproved/)) {
       open(TEMPFILE, ">$tempfile");
       print TEMPFILE ("$sender asks for $groupname\n",
 		      "to be $status.\n\n",
 		      "If this is acceptable, type:\n",
 		      "  $inn::newsbin/ctlinnd newgroup ",
 		      "$groupname $modcmd $sender\n\n",
-		      "The control message follows:\n\n");
+		      "The control message follows:\n\n")
+                           if $status !~ /tagline change/;
+      print TEMPFILE ("$sender asks for a new tagline for $groupname\n",
+		      "If this is acceptable, please change the\n",
+                      "newsgroups-file appropriate.\n\n",
+		      "The control message follows:\n\n")
+                           if $status =~ /tagline change/;
       
       $artfh = open_article($token);
       next if (!defined($artfh));
@@ -150,10 +156,10 @@
 	       "$modcmd $sender (would be $status)");
       }
     } elsif (($action eq "doit") &&
-	     ($status !~ /(no change|unapproved)/)) {
+	     ($status !~ /unapproved/)) {
       # Create the group.
       system("$inn::newsbin/ctlinnd", "-s", "newgroup",
-	     $groupname, $modcmd, $sender);
+	     $groupname, $modcmd, $sender) if $status !~ /tagline change/;
       
       # If there's a tag line, update newsgroups too.
---<---

What should be done is to mail only if there's a change in the
tagline.



Andi       
-- 
  My users get their dirty pics on the web, and use Usenet for what it was
  originally intended.                 Brian Edmonds in news.software.nntp

Technical Details
Message-ID: <slrn8lm0bk.nt9.aba@sol.muenchen.pro-bahn.de>
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
References: <3959EA1E.311B7D68@apdo.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn8lm0bk.nt9.aba@sol.muenchen.pro-bahn.de>
Subject: Re: Problem with control messages
Date: Thu, 29 Jun 2000 00:00:00 +0000
From: "Andreas Barth" <aba@not.so.argh.org>
References: <3959EA1E.311B7D68@apdo.com>
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: 640460716
Organization: A not so poorly-installed InterNetNews site
User-Agent: slrn/0.9.5.7 (UNIX)
Cancel-Lock: sha1:QJQ2N21/SW8fCmwbOeBiDkhZgWo=
Newsgroups: news.software.nntp