topkecleon / otouto

A Lua-based Telegram bot with plugins.
http://otou.to
GNU Affero General Public License v3.0
173 stars 112 forks source link

Better antisquig #81

Closed bb010g closed 7 years ago

bb010g commented 8 years ago

The branch could have been better named, looking back at it. I don't like the i duplication, but it's worth it for usability in tighter loops on the interpreter, esp. in a helper function where it's not taking up space in the middle of unrelated stuff.

topkecleon commented 8 years ago

Is there a case for this change? Is the current way of doing things inefficient, or not easy to expand?

bb010g commented 7 years ago

This deduplicates checks, should be about as fast, and allows for potential live flag changes in the future if the checked tables are made a public part of administration.