Chromozon / Q2JumpRefresh

A pet project to refactor q2jump.
Other
1 stars 2 forks source link

Local admin system (#27) #44

Open TotallyMehis opened 3 years ago

TotallyMehis commented 3 years ago

Local admin system that uses the SQLite db. Still work in progress.

Uses picosha3 (single cpp header file) for hashing the passwords with SHA3 and salts them with a user-configurable string. To configure the salt, <serverport>/.dbsalt-file needs to be created with the salt inside. I'm no security expert, this is the best I could come up with.

Commands:

adminlogin <password> # Log in as a local admin.
adminlogout # Log out as a local admin.

Proposed commands:

adminaddprivileges <username> <permissions> # Eg. adminaddprivileges Mehis mapchange kick voteban
adminremoveprivileges <username> <permissions> # Eg. adminremoveprivileges Mehis mapchange kick voteban

adminadd <username> <password> # Adds a new admin. Requires an admin with proper privileges.
adminremove <username> # Removes an admin. Requires an admin with proper privileges.

# And the usual actions you'd want to perform as an admin:
kick <username>
ban <username>
forcevote
# ...