From fe6d08178b4cabe9bb633c9e6a456a08ee953af4 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 27 Jun 2010 11:13:30 +0000 Subject: [PATCH] Anti-join flood bans for 2^5 hours for first offense instead of 2^7 hours (now uses 2^(4+number_of_offenses) hours as timeout) --- PBot/AntiFlood.pm | 2 +- PBot/VERSION.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index 5a38dfeb..5ff8a95b 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -209,7 +209,7 @@ sub check_flood { if(${ $self->message_history }{$account}{$channel}{join_watch} >= $max_messages) { ${ $self->message_history }{$account}{$channel}{offenses}++; - my $timeout = (2 ** (($self->message_history->{$account}{$channel}{offenses} + 4) < 10 ? ${ $self->message_history }{$account}{$channel}{offenses} + 6 : 10)); + my $timeout = (2 ** (($self->message_history->{$account}{$channel}{offenses} + 4) < 10 ? ${ $self->message_history }{$account}{$channel}{offenses} + 4 : 10)); my $banmask = address_to_mask($host); diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 9e3d95a3..4bbcd4b3 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 208, - BUILD_DATE => "2010-06-26", + BUILD_REVISION => 209, + BUILD_DATE => "2010-06-27", }; 1;