From: Stephen L Johnson <sjohnson@monsters.org>
Date: Sun, 31 Dec 2000 22:59:58 +0000 (+0000)
Subject: added 'last_if_match' logic to rules scan loop
X-Git-Tag: spong-2_7_2~6
X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fac222a460aa01239f963709cf5035236164b5d6;p=spong.git

added 'last_if_match' logic to rules scan loop
---

diff --git a/src/spong-message.pl b/src/spong-message.pl
index 1d874ac..1d17fe4 100755
--- a/src/spong-message.pl
+++ b/src/spong-message.pl
@@ -12,7 +12,7 @@
 # (2) Added rules based paging (Stephen Johnson  Nov 14, 1998)
 # (3) Added checks against Acks and downtime (Stephen Johnson  Mar 17, 1999)
 #
-# $Id: spong-message.pl,v 1.24 2000/12/31 05:50:26 sljohnson Exp $
+# $Id: spong-message.pl,v 1.25 2000/12/31 22:59:58 sljohnson Exp $
 
 use lib "@@LIBDIR@@";
 
@@ -496,6 +496,13 @@ RULE:
              $contact->{'rcpt'} : $contact) );
          add_contact(\@con,$contact);
       }
+
+      if( $match and $rules->{'last_if_match'} == 1 ) {
+         debug("'last_if_match' flag set on rule $c $rule->{'name'}," .
+               " exiting rules scan");
+         last;
+      }
+
    }
 
    # Load the messaging functions