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

Ignore other bots (+B mode) #158

Open
johnmaguire opened this issue Mar 21, 2020 · 6 comments
Open

Ignore other bots (+B mode) #158

johnmaguire opened this issue Mar 21, 2020 · 6 comments

Comments

@johnmaguire
Copy link
Owner

If +B is set on a user, Cardinal should ignore their messages

@CloudyGuyThompson
Copy link

CloudyGuyThompson commented Dec 12, 2020

Started looking at this one - Do you have an example of what Cardinal sees when the decoder is running in bot.py?

I'm assuming we'd need to store the name from the message line (assuming it's even held in there) and if the name includes +B then do not send the self.event_manager.fire("irc.raw", command, line) and instead break?

EDIT: I'd run it myself in debug to see what it does but I'm currently on an M1 mac with no Docker support!

@johnmaguire
Copy link
Owner Author

johnmaguire commented Dec 13, 2020

@GuyT-DevOps You can setup the cardinal.bot.irc logger to show raw messages from the server - change this line to include the "file" and or "console" handler (Docker logs use the console handler): https://github.com/JohnMaguire/Cardinal/blob/d3262193e2a50610144d55f78a43b2ef4e2d5c74/config/config.example.json#L75

Alternatively you can listen for irc.raw in a plug-in and log the values.

I'm not positive if the IRC spec includes anything about showing +B mode in the messages from the server.

It may be necessary to make a NAMES request, and maybe even WHO requests or similar to determine if bot modes are set.

@johnmaguire
Copy link
Owner Author

https://ircv3.net/specs/extensions/multi-prefix-3.1

There is this which will show all prefixes in NAMES. I'm not sure if this is only channel membership or includes user modes. Probably just channel membership.

It may be necessary to make a NAMES/WHO call for the current channel, followed by WHOIS for users, to determine who is a bot. It may be the case that this is too slow/spammy. I am also not sure that we currently have WHOIS support built in. If we were to build it, it should probably work very similarly to the WHO command.

@johnmaguire
Copy link
Owner Author

johnmaguire commented Dec 13, 2020

OK, did some more digging -

There's quite a few different ways servers support this mode. They are mostly summed up here: ircv3/ircv3-ideas#43 (comment)

It looks like Unreal is considering adding a message tag similar to InspIRCd.

I'm not sure there's really a good, full solution to this today, without a lot of code to support various daemons.

@johnmaguire johnmaguire changed the title Ignore other bots Ignore other bots (+B mode) Jan 30, 2021
@johnmaguire
Copy link
Owner Author

I think this is blocked on coming up with some method for actually detecting bots.

@vwbusguy
Copy link
Contributor

vwbusguy commented Jun 2, 2021

In the meantime, is there any present way to configure an ignore_users style list to prevent Cardinal (globally) from responding to known bots or integrations?

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

3 participants