INN commit: branches/2.5 (doc/pod/news.pod nnrpd/list.c nnrpd/nnrpd.c)

INN Commit rra at isc.org
Sun Nov 29 16:49:27 UTC 2009


    Date: Sunday, November 29, 2009 @ 08:49:27
  Author: iulius
Revision: 8829

LIST SUBSCRIPTIONS recognizes an optional argument:  a wildmat
can now be specified to restrict the results of this command
to specific newsgroups.

Also change the comment returned after the 215 code (the newsgroups
are now "recommended").

Even though a user does not have any right to read groups,
let him see a possible message of the day (LIST MOTD).

Modified:
  branches/2.5/doc/pod/news.pod
  branches/2.5/nnrpd/list.c
  branches/2.5/nnrpd/nnrpd.c

------------------+
 doc/pod/news.pod |    6 ++++++
 nnrpd/list.c     |    9 +++++----
 nnrpd/nnrpd.c    |    2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2009-11-29 16:48:42 UTC (rev 8828)
+++ doc/pod/news.pod	2009-11-29 16:49:27 UTC (rev 8829)
@@ -70,6 +70,12 @@
 
 =item *
 
+LIST SUBSCRIPTIONS recognizes an optional argument:  a wildmat
+can now be specified to restrict the results of this command
+to specific newsgroups.
+
+=item *
+
 A new feature has been added to B<sm>.  When the B<-c> flag is used,
 it shows a clear, decoded form of the storage API token.  This
 was previously done by the contrib B<showtoken> script developed

Modified: nnrpd/list.c
===================================================================
--- nnrpd/list.c	2009-11-29 16:48:42 UTC (rev 8828)
+++ nnrpd/list.c	2009-11-29 16:49:27 UTC (rev 8829)
@@ -41,7 +41,7 @@
 };
 static LISTINFO               INFOsubs = {
     "SUBSCRIPTIONS", INN_PATH_NNRPSUBS, NULL, false,
-    "automatic group subscriptions", "Subscriptions in form \"group\""
+    "recommended group subscriptions", "Subscriptions in form \"group\""
 };
 static LISTINFO		INFOdistribpats = {
     "DISTRIB.PATS", INN_PATH_DISTPATS, NULL, false, "distribution patterns",
@@ -206,12 +206,12 @@
 		return;
 	}
     } else if (lp == &INFOgroups || lp == &INFOactivetimes
-               || lp == &INFOheaders) {
+               || lp == &INFOheaders || lp == &INFOsubs) {
 	if (ac == 3)
 	    wildarg = av[2];
     }
     /* Three arguments can be passed only when ACTIVE, ACTIVE.TIMES,
-     * HEADERS or NEWSGROUPS keywords are used. */
+     * HEADERS, NEWSGROUPS or SUBSCRIPTIONS keywords are used. */
     if (ac > 2 && !wildarg) {
         Reply("%d Unexpected wildmat\r\n", NNTP_ERR_SYNTAX);
         return;
@@ -243,7 +243,7 @@
     }
 
     Reply("%d %s\r\n", NNTP_OK_LIST, lp->Format);
-    if (!PERMspecified) {
+    if (!PERMspecified && lp != &INFOmotd) {
 	/* Optimize for unlikely case of no permissions and false default. */
 	QIOclose(qp);
 	Printf(".\r\n");
@@ -304,6 +304,7 @@
 	    if (!PERMmatch(PERMreadlist, grplist))
 		continue;
 	}
+
         /* Check whether the newsgroup matches the wildmat pattern,
          * if given. */
 	if (wildarg && !uwildmat(p, wildarg))

Modified: nnrpd/nnrpd.c
===================================================================
--- nnrpd/nnrpd.c	2009-11-29 16:48:42 UTC (rev 8828)
+++ nnrpd/nnrpd.c	2009-11-29 16:49:27 UTC (rev 8829)
@@ -142,7 +142,7 @@
     {	"LIST",		CMDlist,	true,	1,	3,      true,
 	"[ACTIVE [wildmat]|ACTIVE.TIMES [wildmat]|DISTRIB.PATS|DISTRIBUTIONS"
         "|HEADERS [MSGID|RANGE]|MODERATORS|MOTD|NEWSGROUPS [wildmat]"
-        "|OVERVIEW.FMT|SUBSCRIPTIONS]" },
+        "|OVERVIEW.FMT|SUBSCRIPTIONS [wildmat]]" },
     {	"LISTGROUP",	CMDgroup,	true,	1,	3,      true,
 	"[newsgroup [range]]" },
     {	"MODE",		CMDmode,	false,	2,	2,      true,




More information about the inn-committers mailing list