Add mysql vars text

This commit is contained in:
Vortrex
2021-01-25 22:41:37 -06:00
parent dfac46e128
commit f336f3b34c

View File

@@ -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`);
}
}
}
// -------------------------------------------------------------------------