[PATCH] improve wording of newgroup log message

Julien ÉLIE julien at trigofacile.com
Thu Jan 20 16:47:20 UTC 2011


Hi Florian,

> today, innreport found a log line with a slightly peculiar sounding 
> reason:
> 
> controlchan[29384]: skipping newgroup free.de.etc.selbsthilfe.angst y dk3uz at arrl.net (would no change): Empty description
>
> The below patch tries to address the matter.

Yes, it does the trick.
Thanks for the patch.

I also patched rmgroup.pl because the same issue exists with "no change".
This way, the two files are now homogeneous.


--- rmgroup.pl	(r?vision 9112)
+++ rmgroup.pl	(copie de travail)
@@ -37,18 +37,18 @@
     close ACTIVE;
     my $status;
     if (not @oldgroup) {
-        $status = 'no change';
+        $status = 'not change';
     } elsif (not $approved) {
-        $status = 'unapproved';
+        $status = 'be unapproved';
     } else {
-        $status = 'removed';
+        $status = 'be removed';
     }
 
-    if ($action eq 'mail' and $status !~ /(no change|unapproved)/) {
+    if ($action eq 'mail' and $status !~ /(not change|be unapproved)/) {
         my $mail = sendmail("rmgroup $groupname $sender");
         print $mail <<END;
 $sender asks for $groupname
-to be $status.
+to $status.
 
 If this is acceptable, type:
   $INN::Config::newsbin/ctlinnd rmgroup $groupname
@@ -66,11 +66,11 @@
     } elsif ($action eq 'log') {
         if ($log) {
             logger($log, "skipping rmgroup $groupname"
-                . " $sender (would be $status)", $article);
+                . " $sender (would $status)", $article);
         } else {
-            logmsg("skipping rmgroup $groupname $sender (would be $status)");
+            logmsg("skipping rmgroup $groupname $sender (would $status)");
         }
-    } elsif ($action eq 'doit' and $status !~ /(no change|unapproved)/) {
+    } elsif ($action eq 'doit' and $status !~ /(not change|be unapproved)/) {
         ctlinnd('rmgroup', $groupname);
         # Update newsgroups too.
         shlock("$INN::Config::locks/LOCK.newsgroups");




-- 
Julien ÉLIE

« Don't marry for money; you can borrow it cheaper. » (proverbe
  écossais)



More information about the inn-workers mailing list