INN commit: trunk/control/modules (newgroup.pl rmgroup.pl)

INN Commit rra at isc.org
Thu Jan 20 16:51:26 UTC 2011


    Date: Thursday, January 20, 2011 @ 08:51:26
  Author: iulius
Revision: 9155

Improve the wording of the action taken after a newgroup/rmgroup
control article.  Always use a verb.

Thanks to Florian Schlichting for the patch.

Modified:
  trunk/control/modules/newgroup.pl
  trunk/control/modules/rmgroup.pl

-------------+
 newgroup.pl |   12 ++++++------
 rmgroup.pl  |   16 ++++++++--------
 2 files changed, 14 insertions(+), 14 deletions(-)

Modified: newgroup.pl
===================================================================
--- newgroup.pl	2010-12-25 22:00:26 UTC (rev 9154)
+++ newgroup.pl	2011-01-20 16:51:26 UTC (rev 9155)
@@ -133,13 +133,13 @@
             $status = 'be made moderated';
         } else {
             if ($ngdesc eq $olddesc) {
-                $status = 'no change';
+                $status = 'not change';
             } else {
                 $status = 'have a new description';
             }
         }
     } elsif (not $approved) {
-        $status = 'unapproved';
+        $status = 'be unapproved';
     } else {
         $status = 'be created';
     }
@@ -169,7 +169,7 @@
         return;
     }
 
-    if ($action eq 'mail' and $status !~ /(no change|unapproved)/) {
+    if ($action eq 'mail' and $status !~ /(not change|be unapproved)/) {
         my $mail = sendmail("newgroup $groupname $modcmd $sender");
         print $mail <<END;
 $sender asks for $groupname
@@ -196,8 +196,8 @@
             logmsg("skipping newgroup $groupname $modcmd $sender"
                 . " (would $status)");
         }
-    } elsif ($action eq 'doit' and $status ne 'unapproved') {
-        if ($status ne 'no change') {
+    } elsif ($action eq 'doit' and $status ne 'be unapproved') {
+        if ($status ne 'not change') {
             # The status 'be made (un)moderated' prevails over
             # 'have a new description' so it is executed.
             ctlinnd('newgroup', $groupname, $modcmd, $sender)
@@ -208,7 +208,7 @@
 
         if ($log) {
             logger($log, "newgroup $groupname $modcmd $status $sender",
-                   $article) if ($log ne 'mail' or $status ne 'no change');
+                   $article) if ($log ne 'mail' or $status ne 'not change');
         }
     }
     return;

Modified: rmgroup.pl
===================================================================
--- rmgroup.pl	2010-12-25 22:00:26 UTC (rev 9154)
+++ rmgroup.pl	2011-01-20 16:51:26 UTC (rev 9155)
@@ -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");




More information about the inn-committers mailing list