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

Add a way for modules to listen on Willie's output #526

Closed
elad661 opened this issue Apr 29, 2014 · 2 comments
Closed

Add a way for modules to listen on Willie's output #526

elad661 opened this issue Apr 29, 2014 · 2 comments
Labels
Milestone

Comments

@elad661
Copy link
Contributor

elad661 commented Apr 29, 2014

It would be neat if modules could act upon Willie's own output. We discussed this before and I think the general conclusion was "too hard to do". The thing is, it won't be to hard if we decide that callables are uni-directional (one callable won't be able to listen to both input and output).

If we can't build Trigger() properly for this, we can simply provide the raw line sent. We should encourage modules to not send out more data in response to parsing sent data, cause that might lead to an infinite loop. We especially don't want url.py or anything similar to use that.

Output triggers should use events and regexes and priorities as well.

This will be useful for chanlogs as it will allow as to log what the bot is saying to the channel.

calling the callables should be done after the sending lock is released, because you never want to hold that lock for too long.

As for defining such callables, I suggest @willie.module.output_handler

@TimSimmons
Copy link

+1, I'd like to be able to log Willie's output.

@maxpowa
Copy link
Contributor

maxpowa commented Jun 22, 2016

I've implemented this in #1072.

@dgw dgw added this to the 7.0.0 milestone Apr 9, 2018
@dgw dgw closed this as completed in #1470 Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants