3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-04 18:38:47 +02:00

Don't remove ban_timeout on -q (only +b/-b are tracked); use wildcard host when banning for evasion instead of specific host

This commit is contained in:
Pragmatic Software 2013-08-06 19:56:28 +00:00
parent 2a332d6415
commit a6f608cda5
3 changed files with 6 additions and 6 deletions

View File

@ -590,12 +590,12 @@ sub check_bans {
}
if(defined $bans) {
$mask =~ m/[^!]+\!(.*)/;
my $banmask = "*!$1";
$mask =~ m/[^!]+!([^@]+)@(.*)/;
my $banmask = "*!$1@" . address_to_mask($2);
foreach my $baninfo (@$bans) {
$self->{pbot}->logger->log("anti-flood: [check-bans] $mask evaded $baninfo->{banmask} banned in $baninfo->{channel} by $baninfo->{owner}, banning $banmask\n");
$self->{pbot}->chanops->ban_user_timed($banmask, $baninfo->{channel}, 60 * 60 * 16);
$self->{pbot}->chanops->ban_user_timed($banmask, $baninfo->{channel}, 60 * 60 * 12);
$self->message_history->{$mask}->{channels}->{$channel}{validated} = 0;
return;
}

View File

@ -141,7 +141,7 @@ 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($self->{pbot}->chanops->{unban_timeout}->find_index($channel, $target)) {
if($mode eq "-b" and $self->{pbot}->chanops->{unban_timeout}->find_index($channel, $target)) {
$self->{pbot}->chanops->{unban_timeout}->remove($channel, $target);
}
} else {

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 419,
BUILD_DATE => "2013-08-03",
BUILD_REVISION => 420,
BUILD_DATE => "2013-08-06",
};
1;