diff src/configfile.c @ 212:21200ce10e68 noffle

[svn] filter post-status=mod|yes|no.
author mirkol
date Thu, 22 Nov 2001 12:04:45 +0000
parents 24d4cd032da5
children bf290632d29e
line wrap: on
line diff
--- a/src/configfile.c	Thu Nov 22 12:03:01 2001 +0000
+++ b/src/configfile.c	Thu Nov 22 12:04:45 2001 +0000
@@ -6,7 +6,7 @@
     SPOOLDIR
     VERSION
 
-  $Id: configfile.c 316 2001-10-31 11:44:53Z bears $
+  $Id: configfile.c 331 2001-11-22 12:04:45Z mirkol $
 */
 
 #if HAVE_CONFIG_H
@@ -742,6 +742,8 @@
 	    rule.type = RULE_NOREFS_LT;
 	else if ( strcmp( ruleName, "xposts" ) == 0 )
 	    rule.type = RULE_XPOSTS_LT;
+	else if ( strcmp( ruleName, "post-status" ) == 0 )
+	    rule.type = RULE_POST_STATUS;
 	else if ( strcmp( ruleName, "action" ) != 0 )
 	    goto synErr;
 
@@ -793,6 +795,14 @@
 	    if ( regcomp( &rule.data.regex, value, REG_EXTENDED ) != 0 )
 		goto synErr;
 	}
+	else if (rule.type == RULE_POST_STATUS )
+	    if ( ( strcmp( value, "yes" ) == 0 ) || \
+	         ( strcmp( value, "no" ) == 0 ) || \
+	         ( strncmp( value, "mod", 3 ) == 0 ) )
+				/* no need to type out "moderated" */
+                rule.data.postAllow = value[0]; /* 'y','n' or 'm' */
+	    else
+		goto synErr;
 	else
 	{
 	    char * endVal;