-
Notifications
You must be signed in to change notification settings - Fork 0
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
User Ignores #21
Comments
Hmmm. Sounds tricky to implement without some kind of hook. How do you propose we tackle this? |
I think it would require some integration in the module handler. Which is why I flagged it as discussion. I'm not sure even EA's action system would be able to handle this without changes to the core. My idea is that the module handler would check a dictionary of lists to see if a user isn't allowed to use a particular module (or all of them). |
You could do it, but everything that might need to ignore something would have to call it. I did this in RoBoBo (no action system because C++ is more rigid) by adding support for just ignoring arbitrary messages in the core, and then I added an ignore module with all the interface and actually returning MSG_IGNORE on certain messages (the interface being a hook into the admin module with the ignore command). I think my suggestion in the Module API discussion was to add a flag to your message class (or maybe the response class; however it makes the most sense for how you actually ended up implementing the API).
You shouldn't have needed to do that at all. Even without the action system, I'd hope you have some method of letting modules communicate. |
I've implemented basic ignores for now, with matching on nick only and global ignoring. |
Implemented module-specific ignoring, but it's rather wonky. I could solve it by using self.bot.moduleHandler._shouldTrigger, but I'm reluctant to do so since it's an internal use method. This could also be useful in the admin module, if we want non-command admin modules. |
I'd like to have specific ignores down to individual modules, with the ability to globally ignore, too.
Possible syntax:
Global:
!ignore nick!.*@.* all
URLFollow:
!ignore nick!.*@.* urlfollow
URLFollow and triggered responses:
!ignore nick!.*@.* urlfollow responses
Maybe some groups too, which would be aliases for a list of modules.
bot
could be[u"urlfollow", u"responses"]
, for instance.These groups could be editable via commands.
The text was updated successfully, but these errors were encountered: