zachbr / Dis4IRC

A modern Discord <-> IRC bridge
MIT License
51 stars 18 forks source link

When user doesn't have an active Discord account, use a Github avatar as a fallback #42

Open Techcable opened 4 years ago

Techcable commented 4 years ago

I'm a big fan of user avatars and I get quite attached to them. This would make it somewhat nicer to talk with members of our community who choose to continue using IRC. Most IRC users have the 'HideMail' flag enabled, so I'm thinking we try to lookup a github user that matches the IRC account. We could possibly restrict this to registered IRC users to avoid spamming the Github API.

Dicussed (on discord)[https://discordapp.com/channels/289587909051416579/555469074080202765/729044968773124147]

I'm just putting this here so I don't forget about this :smile:

It was also mentioned that the existing functionality could (theoretically) be abused. For example, RoboMWM doesn't have an IRC account. It would be possible to create a discord user with his name with some avatar he doesn't like. Not really sure what a good solution to this would be since IRC usernames could probably be spoofed even more easily.

zachbr commented 4 years ago

Spoofing is not a concern. It is up to the guilds and IRC channels to handle that. Not a concern for this project.

Techcable commented 4 years ago

That's good :)

Phoenix suggested also using the Paper forums as another fallback. As an alternative to gravitar he suggested libavatar (though that seems to require an email address as well).

Also, Aikar had a very fun fallback using RoboHash

By using ?set=4 it can automatically generate kittens (instead of robots). Here's an example for my username: Kitten Much more fun than the default!

Chew commented 4 years ago

Could also support IRCCloud avatars. Every IRCCloud user has their username set as [s/u]id[id], and their avatar (if they have one) is https://static.irccloud-cdn.com/avatar-redirect/[id]. I was going to try and PR this myself however user details aren't passed to the webhook maker.