Prefix
This commit is contained in:
@@ -284,31 +284,31 @@ function toggleAccountGUICommand(command, params, client) {
|
||||
if (doesPlayerHaveGUIEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
|
||||
}
|
||||
|
||||
if (!isPlayerLoggedIn(client)) {
|
||||
if (getPlayerData().accountData.databaseId != 0) {
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerLoginGUI(client);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`);
|
||||
} else {
|
||||
hideAllPlayerGUI(client);
|
||||
messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "{ALTCOLOUR}/login{MAINCOLOUR}"));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`);
|
||||
}
|
||||
} else {
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerRegistrationGUI(client);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
|
||||
} else {
|
||||
hideAllPlayerGUI(client);
|
||||
messagePlayerNormal(client, getLocaleString(client, "WelcomeNewPlayer", getServerName(), getPlayerName(client), "{ALTCOLOUR}/register{MAINCOLOUR}"));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,11 +323,11 @@ function toggleAccountLoginAttemptNotificationsCommand(command, params, client)
|
||||
if (doesPlayerHaveLoginAlertsEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, `⚙️ You turned ${getBoolRedGreenInlineColour(false)}OFF{MAINCOLOUR} notification by email when somebody tries to login to your account`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, `⚙️ You turned ${getBoolRedGreenInlineColour(true)}ON{MAINCOLOUR} notification by email when somebody tries to login to your account`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -341,14 +341,14 @@ function toggleAccountServerLogoCommand(command, params, client) {
|
||||
if (!doesPlayerHaveLogoEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "AccountServerLogoSet", `${getBoolRedGreenInlineColour(true)}${getLocaleString(client, "On")}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`);
|
||||
if (getServerConfig().showLogo) {
|
||||
updatePlayerShowLogoState(client, true);
|
||||
}
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "AccountServerLogoSet", `${getBoolRedGreenInlineColour(false)}${getLocaleString(client, "Off")}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`);
|
||||
updatePlayerShowLogoState(client, false);
|
||||
}
|
||||
|
||||
@@ -377,11 +377,11 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) {
|
||||
if (!doesPlayerHaveTwoFactorAuthEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "TwoFactorAuthSet", `${getBoolRedGreenInlineColour(true)}${getLocaleString(client, "On")}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "TwoFactorAuthSet", `${getBoolRedGreenInlineColour(false)}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -828,7 +828,7 @@ function saltAccountInfo(name, password) {
|
||||
// ===========================================================================
|
||||
|
||||
function loginSuccess(client) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} successfully logged in.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} successfully logged in.`);
|
||||
getPlayerData(client).loggedIn = true;
|
||||
|
||||
if (getPlayerData(client).loginTimeout != null) {
|
||||
@@ -839,7 +839,7 @@ function loginSuccess(client) {
|
||||
updateConnectionLogOnAuth(client, getPlayerData(client).accountData.databaseId);
|
||||
|
||||
if (doesPlayerHaveStaffPermission(client, "Developer") || doesPlayerHaveStaffPermission(client, "ManageServer")) {
|
||||
logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`);
|
||||
logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`);
|
||||
setPlayerNativeAdminState(client, true);
|
||||
}
|
||||
|
||||
@@ -851,11 +851,11 @@ function loginSuccess(client) {
|
||||
}, 3500);
|
||||
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`);
|
||||
showPlayerErrorGUI(client, getLocaleString(client, "NotATester"), getLocaleString(client, "AccessDenied"));
|
||||
return false;
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`);
|
||||
messagePlayerError(client, getLocaleString(client, "NotATester"));
|
||||
return false;
|
||||
}
|
||||
@@ -866,10 +866,10 @@ function loginSuccess(client) {
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerPrompt(client, getLocaleString(client, "NoCharactersGUIMessage"), getLocaleString(client, "NoCharactersGUIWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
getPlayerData(client).promptType = V_PROMPT_CREATEFIRSTCHAR;
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
|
||||
} else {
|
||||
messagePlayerAlert(client, getLocaleString(client, "NoCharactersChatMessage", `{ALTCOLOUR}/newchar{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters message (GUI disabled)`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters message (GUI disabled)`);
|
||||
}
|
||||
} else {
|
||||
showCharacterSelectToClient(client);
|
||||
@@ -1068,7 +1068,7 @@ function checkLogin(client, password) {
|
||||
}
|
||||
|
||||
if (isPlayerLoggedIn(client)) {
|
||||
logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is already logged in`);
|
||||
logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is already logged in`);
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerLoginSuccessGUI(client);
|
||||
} else {
|
||||
@@ -1079,25 +1079,25 @@ function checkLogin(client, password) {
|
||||
}
|
||||
|
||||
if (!isPlayerRegistered(client)) {
|
||||
logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is not registered`);
|
||||
logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but is not registered`);
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerRegistrationGUI(client);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
|
||||
} else {
|
||||
messagePlayerError(client, "Your name is not registered! Use /register to make an account.");
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (areParamsEmpty(password)) {
|
||||
logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (empty password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
|
||||
logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (empty password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerLoginFailedGUI(client, getLocaleString(client, "LoginFailedInvalidPassword", getPlayerData(client).loginAttemptsRemaining));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
} else {
|
||||
messagePlayerError(client, getLocaleString(client, "LoginFailedNoPassword", getPlayerData(client).loginAttemptsRemaining));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
}
|
||||
|
||||
// Disabling email login alerts for now. It hangs the server for a couple seconds. Need a way to thread it.
|
||||
@@ -1108,13 +1108,13 @@ function checkLogin(client, password) {
|
||||
}
|
||||
|
||||
if (!isAccountPasswordCorrect(getPlayerData(client).accountData, hashAccountPassword(getPlayerName(client), password))) {
|
||||
logToConsole(LOG_WARN, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
|
||||
logToConsole(LOG_WARN, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} attempted to login but failed (wrong password). ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining`);
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerLoginFailedGUI(client, getLocaleString(client, "LoginFailedInvalidPassword", getPlayerData(client).loginAttemptsRemaining));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
} else {
|
||||
messagePlayerError(client, getLocaleString(client, "LoginFailedInvalidPassword", getPlayerData(client).loginAttemptsRemaining));
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
}
|
||||
|
||||
// Disabling email login alerts for now. It hangs the server for a couple seconds. Need a way to thread it.
|
||||
@@ -1147,7 +1147,7 @@ function checkLogin(client, password) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkRegistration(client, password, confirmPassword = "", emailAddress = "") {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Checking registration for ${getPlayerName(client)}`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Checking registration for ${getPlayerName(client)}`);
|
||||
|
||||
if (isPlayerRegistered(client)) {
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
@@ -1268,11 +1268,11 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
|
||||
}, 5000);
|
||||
|
||||
if (doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the error GUI (not a tester).`);
|
||||
showPlayerErrorGUI(client, getLocaleString(client, "NotATester"), getLocaleString(client, "AccessDenied"));
|
||||
return false;
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account] ${getPlayerDisplayForConsole(client)} is being shown the "not a tester" error message (GUI disabled).`);
|
||||
messagePlayerError(client, getLocaleString(client, "NotATester"));
|
||||
return false;
|
||||
}
|
||||
@@ -1421,7 +1421,7 @@ function savePlayerToDatabase(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Saving client ${getPlayerName(client)} to database ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Saving client ${getPlayerName(client)} to database ...`);
|
||||
saveAccountToDatabase(getPlayerData(client).accountData);
|
||||
|
||||
if (getPlayerData(client).currentSubAccount != -1) {
|
||||
@@ -1443,7 +1443,7 @@ function savePlayerToDatabase(client) {
|
||||
|
||||
saveSubAccountToDatabase(getPlayerCurrentSubAccount(client));
|
||||
}
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Saved client ${getPlayerDisplayForConsole(client)} to database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Saved client ${getPlayerDisplayForConsole(client)} to database successfully!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1477,7 +1477,7 @@ function createDefaultAccountServerData(accountDatabaseId) {
|
||||
// ===========================================================================
|
||||
|
||||
function loadAccountKeybindsFromDatabase(accountDatabaseID) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account keybinds for account ${accountDatabaseID} from database ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account keybinds for account ${accountDatabaseID} from database ...`);
|
||||
|
||||
let tempAccountKeybinds = [];
|
||||
let dbConnection = connectToDatabase();
|
||||
@@ -1500,21 +1500,21 @@ function loadAccountKeybindsFromDatabase(accountDatabaseID) {
|
||||
for (let i in dbAssoc) {
|
||||
let tempAccountKeyBindData = new KeyBindData(dbAssoc[i]);
|
||||
tempAccountKeybinds.push(tempAccountKeyBindData);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Account keybind '${tempAccountKeyBindData.databaseId}' (Key ${tempAccountKeyBindData.key} '${toUpperCase(getKeyNameFromId(tempAccountKeyBindData.key))}') loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Account keybind '${tempAccountKeyBindData.databaseId}' (Key ${tempAccountKeyBindData.key} '${toUpperCase(getKeyNameFromId(tempAccountKeyBindData.key))}') loaded from database successfully!`);
|
||||
}
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
}
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountKeybinds.length} account keybinds for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountKeybinds.length} account keybinds for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
return tempAccountKeybinds;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadAccountStaffNotesFromDatabase(accountDatabaseID) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account staff notes for account ${accountDatabaseID} from database ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account staff notes for account ${accountDatabaseID} from database ...`);
|
||||
|
||||
let tempAccountStaffNotes = [];
|
||||
let dbConnection = connectToDatabase();
|
||||
@@ -1527,20 +1527,20 @@ function loadAccountStaffNotesFromDatabase(accountDatabaseID) {
|
||||
for (let i in dbAssoc) {
|
||||
let tempAccountStaffNoteData = new AccountStaffNoteData(dbAssoc[i]);
|
||||
tempAccountStaffNotes.push(tempAccountStaffNoteData);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Account staff note '${tempAccountStaffNoteData.databaseId}' loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Account staff note '${tempAccountStaffNoteData.databaseId}' loaded from database successfully!`);
|
||||
}
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountStaffNotes.length} account staff notes for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountStaffNotes.length} account staff notes for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
return tempAccountStaffNotes;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadAccountContactsFromDatabase(accountDatabaseID) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account contacts for account ${accountDatabaseID} from database ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account contacts for account ${accountDatabaseID} from database ...`);
|
||||
|
||||
let tempAccountContacts = [];
|
||||
let dbConnection = connectToDatabase();
|
||||
@@ -1553,20 +1553,20 @@ function loadAccountContactsFromDatabase(accountDatabaseID) {
|
||||
for (let i in dbAssoc) {
|
||||
let tempAccountContactData = new AccountContactData(dbAssoc[i]);
|
||||
tempAccountContacts.push(tempAccountContactData);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Account contact '${tempAccountContactData.databaseId}' loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Account contact '${tempAccountContactData.databaseId}' loaded from database successfully!`);
|
||||
}
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountContacts.length} account contacts for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountContacts.length} account contacts for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
return tempAccountContacts;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadAccountMessagesFromDatabase(accountDatabaseID) {
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Loading account messages for account ${accountDatabaseID} from database ...`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Loading account messages for account ${accountDatabaseID} from database ...`);
|
||||
|
||||
let tempAccountMessages = [];
|
||||
let dbConnection = connectToDatabase();
|
||||
@@ -1579,13 +1579,13 @@ function loadAccountMessagesFromDatabase(accountDatabaseID) {
|
||||
for (let i in dbAssoc) {
|
||||
let tempAccountMessageData = new AccountContactData(dbAssoc[i]);
|
||||
tempAccountMessages.push(tempAccountMessageData);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: Account contact '${tempAccountMessageData.databaseId}' loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: Account contact '${tempAccountMessageData.databaseId}' loaded from database successfully!`);
|
||||
}
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[AGRP.Account]: ${tempAccountMessages.length} account messages for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[V.RP.Account]: ${tempAccountMessages.length} account messages for account ${accountDatabaseID} loaded from database successfully!`);
|
||||
return tempAccountMessages;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user