3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

AntiKickAutoRejoin: do not enforce logged-in admins; respect whitelisted users

This commit is contained in:
Pragmatic Software 2019-12-28 22:02:22 -08:00
parent f108c437fe
commit 2942a44fd8

View File

@ -46,7 +46,7 @@ sub on_kick {
$channel = lc $channel; $channel = lc $channel;
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel); return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel);
return 0 if $reason eq '*BANG!*'; return 0 if $reason eq '*BANG!*'; # roulette
if (not exists $self->{kicks}->{$channel} if (not exists $self->{kicks}->{$channel}
or not exists $self->{kicks}->{$channel}->{$target}) { or not exists $self->{kicks}->{$channel}->{$target}) {
@ -64,6 +64,8 @@ sub on_join {
$channel = lc $channel; $channel = lc $channel;
return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel); return 0 if not $self->{pbot}->{chanops}->can_gain_ops($channel);
return 0 if $self->{pbot}->{antiflood}->whitelisted($channel, "$nick!$user\@$host");
return 0 if $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host");
if (exists $self->{kicks}->{$channel} if (exists $self->{kicks}->{$channel}
and exists $self->{kicks}->{$channel}->{$nick}) { and exists $self->{kicks}->{$channel}->{$nick}) {