mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-23 10:34:52 +01:00
Fix ban evasion kicking
This commit is contained in:
parent
8cd59b25da
commit
6dabff19bb
@ -700,8 +700,8 @@ sub check_bans {
|
|||||||
|
|
||||||
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");
|
||||||
my ($bannick) = $banmask =~ m/^([^!]+)/;
|
my ($bannick) = $mask =~ m/^([^!]+)/;
|
||||||
$self->{pbot}->chanops->add_op_command($baninfo->{channel}, "kick $bannick $baninfo->{channel} Ban evasion");
|
$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->{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;
|
||||||
|
@ -119,6 +119,7 @@ sub kick_user {
|
|||||||
|
|
||||||
$self->{pbot}->chanops->add_op_command($from, "kick $from $1 $2");
|
$self->{pbot}->chanops->add_op_command($from, "kick $from $1 $2");
|
||||||
$self->{pbot}->chanops->gain_ops($from);
|
$self->{pbot}->chanops->gain_ops($from);
|
||||||
|
return "/msg $nick Kicking $1 from $from with reason '$2'";
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -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 => 548,
|
BUILD_REVISION => 549,
|
||||||
BUILD_DATE => "2014-04-19",
|
BUILD_DATE => "2014-04-21",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user