Fix ban evasion kicking

This commit is contained in:
Pragmatic Software 2014-04-21 07:26:06 +00:00
parent 8cd59b25da
commit 6dabff19bb
3 changed files with 5 additions and 4 deletions

View File

@ -700,8 +700,8 @@ sub check_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");
my ($bannick) = $banmask =~ m/^([^!]+)/;
$self->{pbot}->chanops->add_op_command($baninfo->{channel}, "kick $bannick $baninfo->{channel} Ban evasion");
my ($bannick) = $mask =~ m/^([^!]+)/;
$self->{pbot}->chanops->add_op_command($baninfo->{channel}, "kick $baninfo->{channel} $bannick Ban evasion");
$self->{pbot}->chanops->ban_user_timed($banmask, $baninfo->{channel}, 60 * 60 * 12);
$self->message_history->{$mask}->{channels}->{$channel}{validated} = 0;
return;

View File

@ -119,6 +119,7 @@ sub kick_user {
$self->{pbot}->chanops->add_op_command($from, "kick $from $1 $2");
$self->{pbot}->chanops->gain_ops($from);
return "/msg $nick Kicking $1 from $from with reason '$2'";
}
1;

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 548,
BUILD_DATE => "2014-04-19",
BUILD_REVISION => 549,
BUILD_DATE => "2014-04-21",
};
1;