sopel-irc / sopel

:robot::speech_balloon: An easy-to-use and highly extensible IRC Bot framework. Formerly Willie.
https://sopel.chat
Other
948 stars 402 forks source link

bot, rules: fix rate limiting rules without a rate limit #2629

Closed Exirel closed 1 month ago

Exirel commented 1 month ago

Description

Fix #2627 by checking if the rate limit is actually set (equal or less than 0s).

I decided to make the at_time parameter mandatory, as it's all internal stuffs and it makes it clearer what time we are comparing it to. That's how I figured out that it was about the repeating call to the same rule for a single trigger: it would check against the same trigger object, but compare it to the latest call to now(). That's why the bug was visible on url rules, and it affected find rules as well.

Checklist

Exirel commented 1 month ago

Good to squash

Done.