fooooooooooooooo / VelocityDiscord

Velocity global chat/discord bridge
GNU Lesser General Public License v2.1
21 stars 10 forks source link

[FEATURE] Whitelisting #30

Open LarrySteeze opened 1 year ago

LarrySteeze commented 1 year ago

Is it possible to add a whitelisting feature, similar to what DiscordSRV uses for spigot based servers?

unilock commented 1 year ago

I assume you're referencing this? https://docs.discordsrv.com/installation/link-to-join-setup/

This allows you to require the player have their discord account linked to their minecraft account before they can play on the server. When a player attempts to join, they get automatically kicked with a message saying that they need to message your DiscordSRV bot a code for them to be able to join.

I'd also be interested in such a feature :)

(I've actually been meaning to write my own "Discord-based whitelist" plugin for a while now - but have never gotten around to it...)

LarrySteeze commented 1 year ago

I assume you're referencing this? https://docs.discordsrv.com/installation/link-to-join-setup/

This allows you to require the player have their discord account linked to their minecraft account before they can play on the server. When a player attempts to join, they get automatically kicked with a message saying that they need to message your DiscordSRV bot a code for them to be able to join.

I'd also be interested in such a feature :)

(I've actually been meaning to write my own "Discord-based whitelist" plugin for a while now - but have never gotten around to it...)

That's exactly what I mean!

fooooooooooooooo commented 1 year ago

if i understand correctly this would require a database on the velocity server to hold whitelist?

LarrySteeze commented 1 year ago

To implement it in a similar fashion to discordsrv, it would require the Plugin to have either it's own database or flatfile (imo dbs are safer) that stores a players uuid and their discord id, to link.

When a player connects, if linked and still present in the discord server, it allows them to stay connected. If not linked, it kicks the player and provides a reason with a randomly generated "link code" that they must dm the bot on discord. If linked but no longer present in the discord server, it kicks the player with a reason stating they must be in the discord server.

Hope that helps.

wicivo commented 9 months ago

@fooooooooooooooo I would very much like you to add this

unilock commented 9 months ago

In the meantime, there's this, which I think is somewhat similar:
https://modrinth.com/plugin/discordauth