Add workaround to ensure $##stop_join_flood forwards are removed from unban_timeouts if non-existent

This commit is contained in:
Pragmatic Software 2013-11-17 17:06:54 +00:00
parent ece84c23f8
commit 489ed21aa0
2 changed files with 8 additions and 3 deletions

View File

@ -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");

View File

@ -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",
};