summaryrefslogtreecommitdiffstats
path: root/modules/classes.pl
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2012-01-31 21:27:51 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2012-01-31 21:27:51 +0000
commit899a7bcaa4bb34ae81bdcf5b4a0e09d6d563649b (patch)
treed28c6687be0695915296dffa125b326768cdabe1 /modules/classes.pl
parent0c1f2ce44422875b771462f6c58b1ad4844f4a69 (diff)
fixing bad code and a lack of ping replies
Diffstat (limited to 'modules/classes.pl')
-rw-r--r--modules/classes.pl8
1 files changed, 5 insertions, 3 deletions
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