mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 04:22:35 +01: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:
parent
2a332d6415
commit
a6f608cda5
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user