Load server config before loading data
This commit is contained in:
@@ -40,16 +40,18 @@ function initServerScripts() {
|
|||||||
initLocaleScript();
|
initLocaleScript();
|
||||||
initCommandScript();
|
initCommandScript();
|
||||||
|
|
||||||
// Load config, commands, and data
|
// Load config and stuff
|
||||||
loadGlobalConfig();
|
loadGlobalConfig();
|
||||||
loadCommands();
|
loadServerConfig();
|
||||||
|
applyConfigToServer(getServerConfig());
|
||||||
|
|
||||||
|
// Load all the server data
|
||||||
loadServerDataFromDatabase();
|
loadServerDataFromDatabase();
|
||||||
|
|
||||||
// Set indexes and cache necessary data
|
// Set indexes and cache necessary data
|
||||||
setAllServerDataIndexes();
|
setAllServerDataIndexes();
|
||||||
createAllServerElements();
|
createAllServerElements();
|
||||||
|
|
||||||
applyConfigToServer(serverConfig);
|
|
||||||
initAllClients();
|
initAllClients();
|
||||||
initTimers();
|
initTimers();
|
||||||
|
|
||||||
@@ -114,8 +116,7 @@ function checkForAllRequiredModules() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function loadServerDataFromDatabase() {
|
function loadServerDataFromDatabase() {
|
||||||
logToConsole(LOG_INFO, "[VRR.Config]: Loading server config ...");
|
logToConsole(LOG_INFO, "[VRR.Config]: Loading server data ...");
|
||||||
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod());
|
|
||||||
|
|
||||||
// Always load these regardless of "test server" status
|
// Always load these regardless of "test server" status
|
||||||
getServerData().itemTypes = loadItemTypesFromDatabase();
|
getServerData().itemTypes = loadItemTypesFromDatabase();
|
||||||
@@ -141,7 +142,6 @@ function loadServerDataFromDatabase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getServerData().commands = loadCommands();
|
getServerData().commands = loadCommands();
|
||||||
allowedSkins = getAllowedSkins(getGame());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user