From: Stephen L Johnson Date: Tue, 19 Dec 2000 22:18:10 +0000 (+0000) Subject: fixed message count problem with contact that are hashes X-Git-Tag: spong-2_7_2~24 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43d06ef14e0510e42ea6c509a4742be63c4d204c;p=spong.git fixed message count problem with contact that are hashes --- diff --git a/src/spong-message.pl b/src/spong-message.pl index d515c60..1740631 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.18 2000/12/19 21:13:46 sljohnson Exp $ +# $Id: spong-message.pl,v 1.19 2000/12/19 22:18:10 sljohnson Exp $ use lib "@@LIBDIR@@"; @@ -505,19 +505,19 @@ RULE: next; } - if ( $ccnt{$contact} >= $MESSAGES_PER_HOUR ) { - debug( $ccnt{$contact} . " pages sent to $contact in last " . - "hour - no message sent." ); - next; - } - - # If + # If contact is a hash, pull out recipient as the contact if ( ref($contact) eq 'HASH') { $c = $contact->{'rcpt'}; } else { $c = $contact; } + if ( $ccnt{$c} >= $MESSAGES_PER_HOUR ) { + debug( $ccnt{$c} . " pages sent to $contact in last " . + "hour - no message sent." ); + next; + } + if ($c =~ m/^(.*):(.*)/) { $person = $1; $func = $2; } else {