Raku / whateverable

đŸ€– Different IRC bots that operate on a bunch of prebuilt Rakudo versions
https://gist.github.com/Whateverable
GNU Affero General Public License v3.0
18 stars 14 forks source link

Bot "thanks" regex is too permissive #371

Open taboege opened 4 years ago

taboege commented 4 years ago

People can thank the whateverable bots, but the regex detecting this is so lax that, for instance, notable swallowed a weekly note today with thanks for someone else:

<AlexDaniel> weekly: Thanks to unclechu++ for a reminder, there's now [...]
<notable6> AlexDaniel, You're welcome!
vrurg commented 4 years ago

@AlexDaniel perhaps it'd make sense either disable the feature (through I like it a lot), or reduce it to support bare Thanks, Thank you, etc. with not continuation.

AlexDaniel commented 4 years ago

Ha-ha! I didn't even notice it :joy:

The assumption was that most bots don't take free text, and it's unlikely that your code or command will start with “Thanks”. But there's a notable exception
 :rofl:

I think a simple addition of <!before ‘to’> can resolve this issue. Whateverable bots are very lax and try to do what you mean in many cases, and that's by design. Of course there are edge cases when a message can trick the bots to do something else, but they're more of conversationalists than precise tooling. Anyway, I keep track of these situations here: https://github.com/perl6/whateverable/wiki/Humor

So yeah, I'd prefer to improve the heuristic instead of removing the easter egg/feature.