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

feat: support CLIENTTAGDENY #366

Closed
wants to merge 2 commits into from

Conversation

RaitoBezarius
Copy link
Contributor

@RaitoBezarius RaitoBezarius commented Aug 11, 2023

This is useful for clients which want to do graceful degradations of client tags features such as typing, reacts, replies, etc.

See https://ircv3.net/specs/extensions/message-tags#rpl_isupport-tokens for specification.

This is useful for clients which want to do graceful
degradations of client tags features such as typing, reacts, replies, etc.

See https://ircv3.net/specs/extensions/message-tags#rpl_isupport-tokens
for specification.
@brunnre8
Copy link
Contributor

hm, this works as the bare minimum, but then again you force all callers to re-implement the "can I use this tag or not" logic...

Might be worth to add a method or such that can answer this for you no?

@RaitoBezarius
Copy link
Contributor Author

hm, this works as the bare minimum, but then again you force all callers to re-implement the "can I use this tag or not" logic...

Might be worth to add a method or such that can answer this for you no?

I actually have this code somewhere, I can push it if you want :).

This introduces a `MessageTags.parseDenylist` which parses
the value of `CLIENTTAGDENY=<value>` string into a structure containing
everything you need to perform O(#allowed tags) or O(#denied tags)
check for whether a tag is allowed or not.

Then, a `MessageTags.isBlocked` function can be used to leverage that
structure to perform this check.
@RaitoBezarius
Copy link
Contributor Author

@brunnre8 This is now pushed in a second commit.

@RaitoBezarius RaitoBezarius changed the title feat: support RPL_ISUPPORT CLIENTTAGDENY feat: support CLIENTTAGDENY Aug 12, 2023
@ItsOnlyBinary
Copy link
Contributor

Replaced with #368

Thanks for the contribution @RaitoBezarius

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.

3 participants