mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-25 19:44:26 +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) {
|
if(defined $bans) {
|
||||||
$mask =~ m/[^!]+\!(.*)/;
|
$mask =~ m/[^!]+!([^@]+)@(.*)/;
|
||||||
my $banmask = "*!$1";
|
my $banmask = "*!$1@" . address_to_mask($2);
|
||||||
|
|
||||||
foreach my $baninfo (@$bans) {
|
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}->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;
|
$self->message_history->{$mask}->{channels}->{$channel}{validated} = 0;
|
||||||
return;
|
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");
|
$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};
|
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);
|
$self->{pbot}->chanops->{unban_timeout}->remove($channel, $target);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -13,8 +13,8 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 419,
|
BUILD_REVISION => 420,
|
||||||
BUILD_DATE => "2013-08-03",
|
BUILD_DATE => "2013-08-06",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user