INN commit: trunk/control/modules (checkgroups.pl)
INN Commit
rra at isc.org
Sat Jul 18 13:07:05 UTC 2009
Date: Saturday, July 18, 2009 @ 06:07:05
Author: iulius
Revision: 8550
Do not act on a checkgroups when there isn't any matching
newsgroup.
Modified:
trunk/control/modules/checkgroups.pl
----------------+
checkgroups.pl | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Modified: checkgroups.pl
===================================================================
--- checkgroups.pl 2009-07-08 06:03:24 UTC (rev 8549)
+++ checkgroups.pl 2009-07-18 13:07:05 UTC (rev 8550)
@@ -36,7 +36,9 @@
my ($ngname, $ngdesc) = split(/\s+/, $_, 2);
my $charset_newsgroup = $charset_message;
- next if ($ngname =~ /$exclusionpats/ or $ngname =~ /$droppats/);
+ next if ($ngname !~ /$newsgrouppats/);
+ next if ($exclusionpats and $ngname =~ /$exclusionpats/);
+ next if ($droppats and $ngname =~ /$droppats/);
# Find the right charset if absent or forced by control.ctl.
foreach (@$charset_from) {
@@ -62,7 +64,10 @@
push(@newbody, $ngname."\t".$ngdesc);
}
- if ($action eq 'mail' and $#newbody >= 0) {
+ # We do not go on if there is no changes to do.
+ return if ($#newbody < 0);
+
+ if ($action eq 'mail') {
my $mail = sendmail("checkgroups by $sender");
print $mail "$sender posted the following checkgroups message:\n\n";
print $mail map { s/^~/~~/; "$_\n" } @headers;
More information about the inn-committers
mailing list