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

Feature Request: MySQL support #90

Open
ge0rdie opened this issue Aug 6, 2020 · 3 comments
Open

Feature Request: MySQL support #90

ge0rdie opened this issue Aug 6, 2020 · 3 comments
Labels
backlog Candidate to be included in a future release feature request A feature should be added or improved
Milestone

Comments

@ge0rdie
Copy link

ge0rdie commented Aug 6, 2020

Hi AK,

I have been asked to run a second server (CTF), so my first thought was how to share the DB so I do not have to maintain two sets of player credentials for each server.

The obvious solution would be MySQL.

I know keeping it light weight is a priority, but I though I would throw the idea out there anyway to see what your thoughts are on it.

thanks
--G

@ge0rdie ge0rdie added the feature request A feature should be added or improved label Aug 6, 2020
@alexanderkress
Copy link
Member

alexanderkress commented Aug 6, 2020

Hello ge0rdie,

I was also experimenting with MySQL support in the past. However, the format of parameterized queries is completely different and therefore not compatible. I was checking today some Python string formatting options, so maybe it would be possible if all select, updates and inserts commands would be replaced. I would need to test this first with a MySQL server.

BUT:
It seems that you have a basic misunderstanding of Quake.
Your GUID (global unique ID) is created of your qkey, the server IP and port.
So you have on any server a total different guid.
Even on the same server but different port (e.g. UrT server 1 on your server port 29760, UrT server 2 on same server port 29761) you have a different ID and the bot will not recognize you.

In your case the situation would get even worse, since the bot will have your known admins for server 1, but will see the same names with a different guid on server two and since these users are unknown, they are guests.
You would even have a problem to get admin rights, since there is already a head admin in the database (for server 1) and everyone on server 2 will be guests.

This was the main reason why I have chosen file based databases. Each server has a unique file and no relation to anything else.

It is also not possible to "migrate" an existing server to a new port or IP address. You would need to replace the old guid with the new ones by hand...

This behaviour is part of Quake and nothing I can control. I assume it is a security feature, since no server admin can steal your guid and do nasty things, because on any other server this guid will be different.

@alexanderkress alexanderkress added the backlog Candidate to be included in a future release label Aug 6, 2020
@ge0rdie
Copy link
Author

ge0rdie commented Aug 8, 2020 via email

@alexanderkress
Copy link
Member

So I have a first version running with MySQL support.
Currently not all queries have been changed, but statistics, admin role etc is already stored in the MySQL database and also still working in SQLite.

@alexanderkress alexanderkress added this to the v1.13 milestone Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Candidate to be included in a future release feature request A feature should be added or improved
Projects
None yet
Development

No branches or pull requests

2 participants