From 489ed21aa004b69d3cd205a5f374d92eb6b87b5a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 17 Nov 2013 17:06:54 +0000 Subject: [PATCH] Add workaround to ensure $##stop_join_flood forwards are removed from unban_timeouts if non-existent --- PBot/BanTracker.pm | 9 +++++++-- PBot/VERSION.pm | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/PBot/BanTracker.pm b/PBot/BanTracker.pm index 8a0f78fc..0112ff07 100644 --- a/PBot/BanTracker.pm +++ b/PBot/BanTracker.pm @@ -141,8 +141,13 @@ sub track_mode { $self->{pbot}->logger->log("ban-tracker: $target " . ($mode eq '-b' ? 'unbanned' : 'unquieted') . " by $source in $channel.\n"); delete $self->{banlist}->{$channel}->{$mode eq "-b" ? "+b" : "+q"}->{$target}; - if($mode eq "-b" and $self->{pbot}->chanops->{unban_timeout}->find_index($channel, $target)) { - $self->{pbot}->chanops->{unban_timeout}->remove($channel, $target); + if($mode eq "-b") { + if($self->{pbot}->chanops->{unban_timeout}->find_index($channel, $target)) { + $self->{pbot}->chanops->{unban_timeout}->remove($channel, $target); + } elsif($self->{pbot}->chanops->{unban_timeout}->find_index($channel, "$target\$##stop_join_flood")) { + # freenode strips channel forwards from unban result if no ban exists with a channel forward + $self->{pbot}->chanops->{unban_timeout}->remove($channel, "$target\$##stop_join_flood"); + } } } else { $self->{pbot}->logger->log("BanTracker: Unknown mode '$mode'\n"); diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 005d3489..6cfae2aa 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 => 469, + BUILD_REVISION => 470, BUILD_DATE => "2013-11-17", };