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

User Ignores #21

Open
StarlitGhost opened this issue Jul 6, 2014 · 5 comments
Open

User Ignores #21

StarlitGhost opened this issue Jul 6, 2014 · 5 comments

Comments

@StarlitGhost
Copy link
Contributor

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.

@Heufneutje
Copy link
Member

Hmmm. Sounds tricky to implement without some kind of hook. How do you propose we tackle this?

@StarlitGhost
Copy link
Contributor Author

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.
I mean I'd like it to be completely modular as we discussed in the module API issue but this seems too useful to ignore. We integrated the admin lists to some extent, and this would be much the same.

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).
{ u"regexUserString": [u"urlfollow", u"responses"], u"anotherUserString": [u"all"] }

@ElementalAlchemist
Copy link

I'm not sure even EA's action system would be able to handle this without changes to the core.

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).

We integrated the admin lists to some extent

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.

@HubbeKing
Copy link
Member

I've implemented basic ignores for now, with matching on nick only and global ignoring.

@HubbeKing
Copy link
Member

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.

@Heufneutje Heufneutje modified the milestones: 2.0, 0.6 Jul 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants