From 7f2cefea7adbcdde11d223506fd83f98133c0930 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 28 Jul 2013 14:12:57 +0000 Subject: [PATCH] Don't check for ban evasion on PARTs --- PBot/AntiFlood.pm | 6 +++++- PBot/VERSION.pm | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index 8345f03b..0332b0d7 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -282,7 +282,11 @@ sub check_flood { # check for ban evasion if channel begins with # (not private message) and hasn't yet been validated against ban evasion if($channel =~ m/^#/ and not $self->message_history->{$account}->{channels}->{$channel}{validated}) { - $self->check_bans($account, $channel); + if($mode == $self->{FLOOD_JOIN} and $text =~ /^PART/) { + # don't check for evasion on PARTs + } else { + $self->check_bans($account, $channel); + } } if($max_messages > 0 and $length >= $max_messages) { diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 8624ad99..423ff85d 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 413, + BUILD_REVISION => 414, BUILD_DATE => "2013-07-28", };