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

Add Discord based server whitelisting #31

Open
MonzUn opened this issue Jan 26, 2021 · 4 comments
Open

Add Discord based server whitelisting #31

MonzUn opened this issue Jan 26, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@MonzUn
Copy link
Contributor

MonzUn commented Jan 26, 2021

  • User runs discord command with ID -> Verified based on trust
  • User runs discord command with ID -> Sent to mod queue to be added manually
  • User runs discord command -> User gets link in PM from bot -> Lookup for a Discord connected Steam account is made.
@MonzUn MonzUn added enhancement New feature or request Major A significant bug or improvement labels Jan 26, 2021
@MonzUn MonzUn removed the Major A significant bug or improvement label Feb 15, 2021
@Dave247
Copy link

Dave247 commented Mar 12, 2021

At its most basic this can be implemented by the user sending a command to the bot with their SLG ID, which the bot/mod would then be add the ID to the Users.eco file on the server.

For example this is how the gaming community I am part of use a Discord bot for whitelisting on it's Squad game servers.
There is a #whitelist-me channel that is the only place that the bot watches for and accepts commands for whitelisting. The channel is set up using roles in Discord as having two ways to gain access to this channel. one is to be an approved community(clan) member, and the other is to donate to the Patreon page and link their Discord account to Patreon.
Of course there's also a few checks and balances the bot has such as only allowing one Discord account to whitelist one ID, and a simple validation that what the user entered is a SLG ID/Steam64ID and not just a random jumble of characters.

What this does is provide a simple yet effective method of implementation, as the entre authentication process "should the user be allowed to whitelist?" is handled by preexisting external methods such as Patreon and Discord itself, while all the bot would do is provide the automation for it.

For the purposes of Eco however there is likely going to be better/fancier ways to implement this such as using the account linking feature, however it would be a lot more complex and take a lot longer, so it might be worth focusing on a simpler solution just so the feature can actually exists, as it can always be improved upon in the future.

@MonzUn
Copy link
Contributor Author

MonzUn commented Mar 12, 2021

Thanks for the feedback, but it seems you have misunderstood the problem a bit.

The plugin would write to the config in memory, it would not with to files directly. This wouldn't work without restarts.
I would also need to support both Steam64ID and SLGID and therefore it can't be done in a channel and should instead be in DM, because the user's Steam64 should be hidden from other players.

The account linking feature already exists in the current public build.
I would not like to create a separate system beside this, so whitelisting should utilize the same system.
The suggestions above are solutions to the problem of connection validation that comes with this.

I'm not touching the problem of validating if a user should be allowed to whitelist at all.
I just need an ID to connect them to or I have no valid ID to whitelist and I can't check any inputted ID before the user has connected and they can't connect until they get the whitelist.

I'm also very much against making something hacky and trying to improve it later.
That creates technical debt and just makes everything slower to develop and more prone to bugs.

@Dave247
Copy link

Dave247 commented Mar 13, 2021

Ah I was afraid that it wouldn't work without restarting though I shouldn't be surprised as that would of been too easy. By writing to the config in memory I assume you are opting for an approach similar to if a admin was to use a chat command while connected to the server to manage the whistelist as I assume that would be recognised straight away?

The bit about authentication was just me thinking about how the entire process would work from start to finish from the user's perspective, though admittedly a chunk of that process (such as authentication) goes beyond the scope of what the mod is trying to do, and that you might end up including in different way.

Regardless, I hope whatever the solution does not end up being too difficult to implement.

@MonzUn
Copy link
Contributor Author

MonzUn commented Mar 14, 2021

Yeah it would work in a similar way.
Since the plugin runs as an integrated part of the server, I can add data directly to the lists that are used to check for whitelisting when someone joins.

I think it will be quite a big feature that is going to be tricky to get both safe and easy to use.
But I'm also confident it really is doable :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants