mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat: web dashboard and playground work
The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch: accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,3 +9,19 @@ std::optional<bool> MySQLDatabase::IsPlaykeyActive(const int32_t playkeyId) {
|
||||
|
||||
return keyCheckRes->getBoolean("active");
|
||||
}
|
||||
|
||||
#include "json.hpp"
|
||||
|
||||
void MySQLDatabase::CreatePlayKey(const std::string_view keyString, const uint32_t uses, const std::string_view notes) {
|
||||
ExecuteInsert("INSERT INTO play_keys (key_string, key_uses, active, created_at, notes) VALUES (?, ?, 1, NOW(), ?);", keyString, uses, notes);
|
||||
}
|
||||
|
||||
void MySQLDatabase::SetPlayKeyActive(const int32_t playkeyId, const bool active) {
|
||||
ExecuteUpdate("UPDATE play_keys SET active = ? WHERE id = ?;", active ? 1 : 0, playkeyId);
|
||||
}
|
||||
|
||||
uint32_t MySQLDatabase::GetPlayKeyCount() {
|
||||
auto res = ExecuteSelect("SELECT COUNT(*) as count FROM play_keys;");
|
||||
return res->next() ? res->getUInt("count") : 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user