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 support for ignoring IRC hosts from Discord #82

Merged
merged 4 commits into from
Feb 16, 2021

Conversation

llmII
Copy link
Contributor

@llmII llmII commented Feb 14, 2021

This should add a configuration option that allows for using nearly IRC style hostmasks to "ban" matching users in IRC from sending messages towards Discord. This would be useful for ignoring bots in channels.

Submitting this as a draft because there might be something else that would be wanted but am not sure if it's worth the effort or the tradeoff.

Should we cache matches (as in, if a nick matches once, cache it until config reload)? The tradeoff is memory for speed. I'm not certain this will have a speed issue until ignoring probably thousands of hosts from IRC.

Will add the appropriate documentation and such after having actually tested that this works as believed it should.

Tested, works, documentation and configuration example added.

@llmII
Copy link
Contributor Author

llmII commented Feb 14, 2021

Tested now and added documentation. Should be ready for checking.

@llmII llmII marked this pull request as ready for review February 14, 2021 12:27
@llmII llmII force-pushed the discord-ignores-irc-feature branch 2 times, most recently from 37b64dd to 17db5d4 Compare February 14, 2021 16:53
This should add a configuration option that allows for using nearly IRC
style hostmasks to "ban" matching users in IRC from sending messages
towards Discord. This would be useful for ignoring bots in channels.
@llmII llmII force-pushed the discord-ignores-irc-feature branch from 17db5d4 to 2193fed Compare February 14, 2021 18:44
Copy link
Owner

@qaisjp qaisjp left a comment

Choose a reason for hiding this comment

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

Thank you!

@qaisjp qaisjp changed the title Initial Support for Ignoring IRC Hosts from Discord Add support for ignoring IRC hosts from Discord Feb 16, 2021
@qaisjp qaisjp merged commit 9b49a56 into qaisjp:master Feb 16, 2021
@qaisjp
Copy link
Owner

qaisjp commented Feb 16, 2021

And yeah I agree with your judgement call — it's probably fine matching every time. It would be useful to add live reload here in the future, it seems like it wouldn't be too hard to implement!

@llmII
Copy link
Contributor Author

llmII commented Feb 16, 2021

And yeah I agree with your judgement call — it's probably fine matching every time. It would be useful to add live reload here in the future, it seems like it wouldn't be too hard to implement!

Live reload? as in if the config changes and irc_ignored_hostmasks are changed it stops/starts ignoring added/removed hostmasks? If so that's already done but if not let me know what you meant by live reload and I'll likely add it to my list of things to get after.

@qaisjp
Copy link
Owner

qaisjp commented Feb 16, 2021

Ah, okay, awesome :)

I keep thinking the "requires restart" column is a "supports live reload" column haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants