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

Implement IRCv3 Message Tags #320

Open
ThePooN opened this issue Oct 9, 2021 · 3 comments
Open

Implement IRCv3 Message Tags #320

ThePooN opened this issue Oct 9, 2021 · 3 comments

Comments

@ThePooN
Copy link
Member

ThePooN commented Oct 9, 2021

Since the inception of the Bancho IRC gateway, bot devs have been plagued with the issue of resolving IRC usernames to user IDs for API requests.

Workarounds in place in APIv1 partially solve this issue, but not all of them (eg. mixed spaces and underscores). There even are instances of accounts with different usernames but identical IRC usernames.

A few examples of the issues it has been causing:

  • Some users need to seek support from a Tillerinobot admin to use the bot and get recommendations ;
  • osu_SQL was unusable by some users, and implementing the same workarounds as Tillerinobot to fix some of them automatically or manually required too much efforts/spaghetti code ;
  • Automated public lobbies can crash because they rely on data from API such as its players' pp for balancing.

IRCv3 message tags are a backwards-compatible extension to the IRC spec that allows to ship additional metadata with messages; we could ship real username and user id alongside every message for example to address these issues.

Twitch chat still uses IRC to this day, and they rely on IRCv3 to implement many of their features and it works very well; see their doc: https://dev.twitch.tv/docs/irc/tags

To maintain backward compatibility, IRCv3 tags are optional and must be requested by the client, for example by sending: CAP REQ :osu.ppy.sh/tags. All messages received from the server (using PRIVMSG) would then be prepended by @user-id=718454 for example.

@peppy peppy self-assigned this Oct 19, 2021
@peppy
Copy link
Member

peppy commented Oct 21, 2021

Took a quick look into implementing this today, but it's going to take some semi-large refactoring. Individual messages are cached at a byte level for efficiency, which means how they are formatted cannot currently differ from user to user as simply as one may hope.

I'll try and see if there's a hacky way we can work around this limitation over the coming days.

@ThePooN
Copy link
Member Author

ThePooN commented Nov 17, 2021

Is there any update on this?

@peppy
Copy link
Member

peppy commented Nov 17, 2021

no

@peppy peppy removed their assignment Jul 26, 2023
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

No branches or pull requests

2 participants