mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01:00
Fix ratelimit override to use correct channel
This commit is contained in:
parent
88147da892
commit
3c509b5306
@ -830,7 +830,7 @@ sub interpreter {
|
||||
if (exists $self->{factoids}->hash->{$channel}->{$keyword}->{last_referenced_on}) {
|
||||
if (exists $self->{factoids}->hash->{$channel}->{$keyword}->{last_referenced_in}) {
|
||||
if ($self->{factoids}->hash->{$channel}->{$keyword}->{last_referenced_in} eq $stuff->{from}) {
|
||||
my $ratelimit = $self->{pbot}->{registry}->get_value($channel, 'ratelimit_override');
|
||||
my $ratelimit = $self->{pbot}->{registry}->get_value($stuff->{from}, 'ratelimit_override');
|
||||
$ratelimit = $self->{factoids}->hash->{$channel}->{$keyword}->{rate_limit} if not defined $ratelimit;
|
||||
if (gettimeofday - $self->{factoids}->hash->{$channel}->{$keyword}->{last_referenced_on} < $ratelimit) {
|
||||
return "/msg $stuff->{nick} $stuff->{ref_from}'$keyword' is rate-limited; try again in " . duration ($ratelimit - int(gettimeofday - $self->{factoids}->hash->{$channel}->{$keyword}->{last_referenced_on})) . "." unless $self->{pbot}->{admins}->loggedin($channel, "$stuff->{nick}!$stuff->{user}\@$stuff->{host}");
|
||||
|
Loading…
Reference in New Issue
Block a user