Don't use locale or translation cache array in main
This commit is contained in:
@@ -59,7 +59,7 @@ function initServerScripts() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkForHashingModule() {
|
||||
if(typeof module.hashing == "undefined") {
|
||||
if (typeof module.hashing == "undefined") {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -68,7 +68,7 @@ function checkForHashingModule() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkForMySQLModule() {
|
||||
if(typeof module.mysql == "undefined") {
|
||||
if (typeof module.mysql == "undefined") {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ function checkForMySQLModule() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkForSMTPModule() {
|
||||
if(typeof module.smtp == "undefined") {
|
||||
if (typeof module.smtp == "undefined") {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,19 +90,19 @@ function checkForSMTPModule() {
|
||||
function checkForAllRequiredModules() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Startup]: Checking for required modules ...");
|
||||
|
||||
if(!checkForHashingModule()) {
|
||||
if (!checkForHashingModule()) {
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: Hashing module is not loaded!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown.");
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
if(!checkForMySQLModule()) {
|
||||
if (!checkForMySQLModule()) {
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: MySQL module is not loaded!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown.");
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
if(!checkForSMTPModule()) {
|
||||
if (!checkForSMTPModule()) {
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: SMTP Email module is not loaded!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: Email features will NOT be available!");
|
||||
}
|
||||
@@ -117,17 +117,16 @@ function loadServerDataFromDatabase() {
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Loading server data ...");
|
||||
|
||||
// Always load these regardless of "test server" status
|
||||
getServerData().localeStrings = loadAllLocaleStrings();
|
||||
getServerData().allowedSkins = getAllowedSkins(getGame());
|
||||
|
||||
// Translation Cache
|
||||
getServerData().cachedTranslations = new Array(getGlobalConfig().locale.locales.length);
|
||||
getServerData().cachedTranslationFrom = new Array(getGlobalConfig().locale.locales.length);
|
||||
getServerData().cachedTranslationFrom.fill([]);
|
||||
getServerData().cachedTranslations.fill(getServerData().cachedTranslationFrom);
|
||||
//getServerData().cachedTranslations = new Array(getGlobalConfig().locale.locales.length);
|
||||
//getServerData().cachedTranslationFrom = new Array(getGlobalConfig().locale.locales.length);
|
||||
//getServerData().cachedTranslationFrom.fill([]);
|
||||
//getServerData().cachedTranslations.fill(getServerData().cachedTranslationFrom);
|
||||
|
||||
// Only load these if the server isn't a testing/dev server
|
||||
if(!getServerConfig().devServer) {
|
||||
if (!getServerConfig().devServer) {
|
||||
getServerData().itemTypes = loadItemTypesFromDatabase();
|
||||
getServerData().items = loadItemsFromDatabase();
|
||||
getServerData().businesses = loadBusinessesFromDatabase();
|
||||
|
||||
Reference in New Issue
Block a user