# HG changeset patch # User bears # Date 972597349 -3600 # Node ID ca9769519c969cea0b24db47b13499da11346023 # Parent cb799054bd61efb800005f447caa8010a5e54a16 [svn] * src/post.c: When posting to a non-local moderated group, only post to one server. Don't want multiple upstream servers each mailing the moderator. Non-moderated groups post to all servers groups in the article are fetched from - otherwise can't be sure an article cross-posted to a netwide group and a restricted one obtained from a just one server will propagate properly. diff -r cb799054bd61 -r ca9769519c96 ChangeLog --- a/ChangeLog Thu Oct 26 22:29:55 2000 +0100 +++ b/ChangeLog Thu Oct 26 22:55:49 2000 +0100 @@ -16,6 +16,12 @@ * src/server.c: When replying to a command, generate the reply into a buffer, release the lock and then send the reply, so we don't hog the lock should the reply stall for some network reason. + * src/post.c: When posting to a non-local moderated group, only + post to one server. Don't want multiple upstream servers each + mailing the moderator. Non-moderated groups post to all servers + groups in the article are fetched from - otherwise can't be sure + an article cross-posted to a netwide group and a restricted one + obtained from a just one server will propagate properly. Sun Oct 15 2000 Markus Enzenberger diff -r cb799054bd61 -r ca9769519c96 src/post.c --- a/src/post.c Thu Oct 26 22:29:55 2000 +0100 +++ b/src/post.c Thu Oct 26 22:55:49 2000 +0100 @@ -1,7 +1,7 @@ /* post.c - $Id: post.c 227 2000-10-26 21:21:13Z bears $ + $Id: post.c 229 2000-10-26 21:55:49Z bears $ */ #if HAVE_CONFIG_H @@ -422,14 +422,14 @@ { const char * grp; Str serversSeen; - Bool err; + Bool err, modPosted; /* * For each external group, send to that group's server if it has * not seen the post already. */ serversSeen[ 0 ] = '\0'; - err = FALSE; + err = modPosted = FALSE; for ( grp = Itl_first( article.newsgroups ); grp != NULL; @@ -438,15 +438,26 @@ if ( Grp_exists( grp ) && ! Grp_local( grp ) ) { const char * servName = Grp_server( grp ); + Bool moderated = ( Grp_postAllow( grp ) == 'm' ); if ( strstr( serversSeen, servName ) != NULL ) continue; + + if ( moderated && modPosted ) + continue; if ( ! Out_add( servName, article.over.msgId, article.text ) ) { Log_err( "Cannot add posted article to outgoing directory" ); err = TRUE; } + /* + * If moderated group, send to one server only. Don't want to + * mailbomb the moderator. + */ + else if ( moderated ) + modPosted = TRUE; + Utl_catStr( serversSeen, " " ); Utl_catStr( serversSeen, servName ); }