From f336f3b34c8fe2825bb82f34c757c816592b5d3e Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 25 Jan 2021 22:41:37 -0600 Subject: [PATCH] Add mysql vars text --- scripts/server/database.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/scripts/server/database.js b/scripts/server/database.js index b4d162a4..c017f97d 100644 --- a/scripts/server/database.js +++ b/scripts/server/database.js @@ -132,18 +132,6 @@ function quickDatabaseQuery(queryString) { // ------------------------------------------------------------------------- function executeDatabaseQueryCommand(command, params, client) { - if(getCommand(command).requireLogin) { - if(!isPlayerLoggedIn(client)) { - messagePlayerError(client, "You must be logged in to use this command!"); - return false; - } - } - - if(!doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(command))) { - messagePlayerError(client, "You do not have permission to use this command!"); - return false; - } - if(areParamsEmpty(params)) { messagePlayerSyntax(client, getCommandSyntaxText(command)); return false; @@ -172,4 +160,17 @@ function executeDatabaseQueryCommand(command, params, client) { return true; } +// ------------------------------------------------------------------------- + +function setConstantsAsGlobalVariablesInDatabase() { + let dbConnection = connectToDatabase(); + let entries = Object.entries(global); + for(let i in entries) { + logToConsole(LOG_DEBUG, `Checking entry ${i} (${entries[i]})`); + if(toString(i).slice(0, 3).indexOf("AG_") != -1) { + logToConsole(LOG_DEBUG, `Adding ${i} (${entries[i]}) to database global variables`); + } + } +} + // ------------------------------------------------------------------------- \ No newline at end of file