3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 04:19:27 +01:00

AntiFlood: devoice +v users when banning

This commit is contained in:
Pragmatic Software 2020-05-29 18:19:42 -07:00
parent 50e000923a
commit cd665619ee

View File

@ -525,7 +525,8 @@ sub check_flood {
} }
if ($self->{pbot}->{nicklist}->get_meta($chan, $nick, '+v')) { if ($self->{pbot}->{nicklist}->get_meta($chan, $nick, '+v')) {
$self->{pbot}->{chanops}->add_op_command($chan, 'mode -v $nick'); $self->{pbot}->{chanops}->add_op_command($chan, "mode $chan -v $nick");
$self->{pbot}->{chanops}->gain_ops($chan);
} }
$self->{pbot}->{banlist}->ban_user_timed( $self->{pbot}->{banlist}->ban_user_timed(
@ -580,7 +581,8 @@ sub check_flood {
} }
if ($self->{pbot}->{nicklist}->get_meta($chan, $nick, '+v')) { if ($self->{pbot}->{nicklist}->get_meta($chan, $nick, '+v')) {
$self->{pbot}->{chanops}->add_op_command($chan, 'mode -v $nick'); $self->{pbot}->{chanops}->add_op_command($chan, "mode $chan -v $nick");
$self->{pbot}->{chanops}->gain_ops($chan);
} }
$self->{pbot}->{banlist}->ban_user_timed( $self->{pbot}->{banlist}->ban_user_timed(
@ -629,7 +631,8 @@ sub check_flood {
} }
if ($self->{pbot}->{nicklist}->get_meta($chan, $nick, '+v')) { if ($self->{pbot}->{nicklist}->get_meta($chan, $nick, '+v')) {
$self->{pbot}->{chanops}->add_op_command($chan, 'mode -v $nick'); $self->{pbot}->{chanops}->add_op_command($chan, "mode $chan -v $nick");
$self->{pbot}->{chanops}->gain_ops($chan);
} }
if ($self->{pbot}->{banlist}->has_ban_timeout($chan, "*!$user\@" . $self->address_to_mask($host))) { if ($self->{pbot}->{banlist}->has_ban_timeout($chan, "*!$user\@" . $self->address_to_mask($host))) {