Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins: unblock background triggers #1725

Merged
merged 4 commits into from
Nov 20, 2019
Merged

Conversation

dgw
Copy link
Member

@dgw dgw commented Oct 26, 2019

The tell, translate, seen, and meetbot plugins all contain match-any rules to run something on any/every message received. Even with #1724 applied, they still cause log spam whenever any ignored user speaks.

Here, I have made the relevant callables in tell, translate, and seen into unblockable functions. There's no reason that ignored users shouldn't receive tell messages, and translate & seen only collect lines passively for use later when commanded by a non-ignored user.

I did not make meetbot's callable unblockable, though. That would allow ignored users to appear in meeting logs despite being blocked from using any commands. Unfortunately this means we'll still get log spam on any instance with meetbot turned on, but when this is combined with #1721 (which makes find's collect-all-lines function unblockable) meetbot will be the only core plugin that causes such a warning with default settings. We can decide to disable it by default, perhaps.

Bonus refactor of translate to use bot.memory instead of a (🤢) global variable.

@dgw dgw added the Tweak label Oct 26, 2019
@dgw dgw added this to the 7.0.0 milestone Oct 26, 2019
@dgw dgw requested a review from a team October 26, 2019 22:16
Copy link
Contributor

@Exirel Exirel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global mangle_lines

Ew. Good riddance!

@dgw dgw force-pushed the unblock-background-triggers branch from d60cbe9 to 1d5f41a Compare November 18, 2019 05:04
@dgw dgw merged commit 415ecd2 into master Nov 20, 2019
@dgw dgw deleted the unblock-background-triggers branch November 20, 2019 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants