# (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@@";
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 {