3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 20:09:43 +01:00

Add options to disable anti-flood per-channel, and to disable enforcement for logged-in admins

This commit is contained in:
Pragmatic Software 2015-06-13 16:08:06 -07:00
parent a3d5dfb63e
commit 8033213a7f

View File

@ -279,7 +279,13 @@ sub check_flood {
}
# do not do flood enforcement for logged in bot admins
if ($self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
if ($self->{pbot}->{registry}->get_value('antiflood', 'dont_enforce_admins') and $self->{pbot}->{admins}->loggedin($channel, "$nick!$user\@$host")) {
$self->{channels}->{$channel}->{last_spoken_nick} = $nick;
next;
}
# do not do flood enforcement for channels that do not want it
if ($self->{pbot}->{registry}->get_value($channel, 'dont_enforce_antiflood')) {
$self->{channels}->{$channel}->{last_spoken_nick} = $nick;
next;
}