From 899a7bcaa4bb34ae81bdcf5b4a0e09d6d563649b Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Tue, 31 Jan 2012 21:27:51 +0000 Subject: fixing bad code and a lack of ping replies --- modules/classes.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modules/classes.pl') diff --git a/modules/classes.pl b/modules/classes.pl index 832951d..6896ce7 100644 --- a/modules/classes.pl +++ b/modules/classes.pl @@ -79,6 +79,7 @@ sub dnsbl # hopefully getting rid of this won't cause shit to assplode # but I'm getting rid of it so it can detect cgi:irc shit if (defined $rev) { + print "Querying $rev$chk->{content}\n" if $::debugx{dnsbl}; my $iaddr = gethostbyname( "$rev$chk->{content}" ); my @dnsbl = unpack( 'C4', $iaddr ) if defined $iaddr; my $strip; @@ -164,7 +165,7 @@ sub splitflood { $cfc = 0; process_cf(); } - if ( $#{@{$cf{$id}{$chan}{$text}}}+1 == int($cut[0]) ) { + if ( scalar @{$cf{$id}{$chan}{$text}} == int($cut[0]) ) { $bs{$id}{$text} = time; return 1; } @@ -195,7 +196,7 @@ sub advsplitflood { $cfc = 0; process_cf(); } - if ( $#{@{$cf{$id}{$chan}{$text}}}+1 == int($cut[0]) ) { + if ( scalar @{$cf{$id}{$chan}{$text}} == int($cut[0]) ) { $bs{$id}{$text} = time; return 1; } @@ -279,7 +280,8 @@ sub flood_add $sfc = 0; flood_process(); } - return $#{ @{$sf{$id}{$chan}{$host}}}+1; +# return $#{ @{$sf{$id}{$chan}{$host}}}+1; + return scalar @{$sf{$id}{$chan}{$host}}; } sub flood_process -- cgit v1.2.3