creesch / discordIRCd

A node.js script that allows you to connect to discord with your irc client.
Apache License 2.0
116 stars 21 forks source link

IRC Nicknames via user Notes (or something) #6

Open Scrxtchy opened 7 years ago

Scrxtchy commented 7 years ago

This might not be a catch-all solution, as I expect some users actually use notes for a purpose, but it would be helpful to have an ability to alias a user to a name https://discord.js.org/#/docs/main/stable/class/User?scrollTo=note

Some messages I get will look like

Their account name uses supported alphanumeric characters as an added detail, but it this didn't work out

irc;([a-zA-Z0-9_\\[\]\{\}\^`\|]+) could be a suggestion to use irc nicks alongside regular notes but I'll let you figure it out

creesch commented 7 years ago

Oh that is actually a fairly good idea.

I want to explore something else as well. Officially irc doesn't support those characters for usernames, however I suspect that many modern clients have no issue with them.

So if I would remove part of the username scrubbing (and it would raise no issues with irc clients) would you still need this feature?

creesch commented 7 years ago

As an addition, I am planning to abuse WHOIS to display things like notes and roles from irc.

Scrxtchy commented 7 years ago

I'm using ZNC as a middleman, so I'm unsure if even that will support erroneous nicknames

creesch commented 7 years ago

Fair enough, I'll implement your suggestion then :)

creesch commented 7 years ago

It also occured to me that my current method of making usernames valid will possibly lead to duplicate usernames. I will need to fix that as well.

Scrxtchy commented 7 years ago

A WHOIS to display their account/display name as their real values would be very helpful

The Docs say that Notes are read only, I wonder if there's another function for setting it otherwise they have a url of https://discordapp.com/api/v6/users/@me/notes/[USERID] Alongside request params, generic authentication/identification

json {note: "content"}