mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-07-02 01:29:51 +00:00
Resolve conflicting port options between chat, master, and world
move chat_server_port to shared since it's used by world and chat
This commit is contained in:
parent
dc45436cbc
commit
9920f01cb8
@ -115,6 +115,9 @@ foreach(resource_file ${RESOURCE_FILES})
|
|||||||
)
|
)
|
||||||
message(STATUS "Moved " ${resource_file} " to project binary directory")
|
message(STATUS "Moved " ${resource_file} " to project binary directory")
|
||||||
elseif(resource_file MATCHES ".ini")
|
elseif(resource_file MATCHES ".ini")
|
||||||
|
UpdateConfigOption("build/authconfig.ini" "port" "auth_server_port")
|
||||||
|
UpdateConfigOption("build/chatconfig.ini" "port" "chat_server_port")
|
||||||
|
UpdateConfigOption("build/masterconfig.ini" "port" "master_server_port")
|
||||||
message(STATUS "Checking " ${resource_file} " for missing config options")
|
message(STATUS "Checking " ${resource_file} " for missing config options")
|
||||||
file(READ ${PROJECT_BINARY_DIR}/${resource_file} current_file_contents)
|
file(READ ${PROJECT_BINARY_DIR}/${resource_file} current_file_contents)
|
||||||
string(REPLACE "\\\n" "" current_file_contents ${current_file_contents})
|
string(REPLACE "\\\n" "" current_file_contents ${current_file_contents})
|
||||||
|
@ -86,7 +86,7 @@ int main(int argc, char** argv) {
|
|||||||
uint32_t maxClients = 50;
|
uint32_t maxClients = 50;
|
||||||
uint32_t ourPort = 1001; //LU client is hardcoded to use this for auth port, so I'm making it the default.
|
uint32_t ourPort = 1001; //LU client is hardcoded to use this for auth port, so I'm making it the default.
|
||||||
if (Game::config->GetValue("max_clients") != "") maxClients = std::stoi(Game::config->GetValue("max_clients"));
|
if (Game::config->GetValue("max_clients") != "") maxClients = std::stoi(Game::config->GetValue("max_clients"));
|
||||||
if (Game::config->GetValue("port") != "") ourPort = std::atoi(Game::config->GetValue("port").c_str());
|
if (Game::config->GetValue("auth_server_port") != "") ourPort = std::atoi(Game::config->GetValue("auth_server_port").c_str());
|
||||||
|
|
||||||
Game::server = new dServer(Game::config->GetValue("external_ip"), ourPort, 0, maxClients, false, true, Game::logger, masterIP, masterPort, ServerType::Auth, Game::config, &Game::lastSignal);
|
Game::server = new dServer(Game::config->GetValue("external_ip"), ourPort, 0, maxClients, false, true, Game::logger, masterIP, masterPort, ServerType::Auth, Game::config, &Game::lastSignal);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ int main(int argc, char** argv) {
|
|||||||
uint32_t maxClients = 50;
|
uint32_t maxClients = 50;
|
||||||
uint32_t ourPort = 1501;
|
uint32_t ourPort = 1501;
|
||||||
if (Game::config->GetValue("max_clients") != "") maxClients = std::stoi(Game::config->GetValue("max_clients"));
|
if (Game::config->GetValue("max_clients") != "") maxClients = std::stoi(Game::config->GetValue("max_clients"));
|
||||||
if (Game::config->GetValue("port") != "") ourPort = std::atoi(Game::config->GetValue("port").c_str());
|
if (Game::config->GetValue("chat_server_port") != "") ourPort = std::atoi(Game::config->GetValue("chat_server_port").c_str());
|
||||||
|
|
||||||
Game::server = new dServer(Game::config->GetValue("external_ip"), ourPort, 0, maxClients, false, true, Game::logger, masterIP, masterPort, ServerType::Chat, Game::config, &Game::lastSignal);
|
Game::server = new dServer(Game::config->GetValue("external_ip"), ourPort, 0, maxClients, false, true, Game::logger, masterIP, masterPort, ServerType::Chat, Game::config, &Game::lastSignal);
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ int main(int argc, char** argv) {
|
|||||||
uint32_t maxClients = 999;
|
uint32_t maxClients = 999;
|
||||||
uint32_t ourPort = 1000;
|
uint32_t ourPort = 1000;
|
||||||
if (Game::config->GetValue("max_clients") != "") maxClients = std::stoi(Game::config->GetValue("max_clients"));
|
if (Game::config->GetValue("max_clients") != "") maxClients = std::stoi(Game::config->GetValue("max_clients"));
|
||||||
if (Game::config->GetValue("port") != "") ourPort = std::stoi(Game::config->GetValue("port"));
|
if (Game::config->GetValue("master_server_port") != "") ourPort = std::stoi(Game::config->GetValue("master_server_port"));
|
||||||
|
|
||||||
Game::server = new dServer(Game::config->GetValue("external_ip"), ourPort, 0, maxClients, true, false, Game::logger, "", 0, ServerType::Master, Game::config, &Game::lastSignal);
|
Game::server = new dServer(Game::config->GetValue("external_ip"), ourPort, 0, maxClients, true, false, Game::logger, "", 0, ServerType::Master, Game::config, &Game::lastSignal);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Port number. The client has the authserver port hardcoded to 1001
|
# Port number. The client has the authserver port hardcoded to 1001
|
||||||
port=1001
|
auth_server_port=1001
|
||||||
|
|
||||||
# 0 or 1, should ignore playkeys
|
# 0 or 1, should ignore playkeys
|
||||||
# If 1 everyone with an account will be able to login, regardless of if they have a key or not
|
# If 1 everyone with an account will be able to login, regardless of if they have a key or not
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# Port number
|
|
||||||
port=2005
|
|
||||||
|
|
||||||
# If you would like to increase the maximum number of best friends a player can have on the server
|
# If you would like to increase the maximum number of best friends a player can have on the server
|
||||||
# Change the value below to what you would like this to be (5 is live accurate)
|
# Change the value below to what you would like this to be (5 is live accurate)
|
||||||
max_number_of_best_friends=5
|
max_number_of_best_friends=5
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
master_ip=localhost
|
master_ip=localhost
|
||||||
|
|
||||||
# Port number
|
# Port number
|
||||||
port=2000
|
master_server_port=2000
|
||||||
|
|
||||||
# The port number to start world servers on. Will be incremented for each world
|
# The port number to start world servers on. Will be incremented for each world
|
||||||
world_port_start=3000
|
world_port_start=3000
|
||||||
|
@ -62,3 +62,7 @@ event_8=
|
|||||||
version_major=1
|
version_major=1
|
||||||
version_current=10
|
version_current=10
|
||||||
version_minor=64
|
version_minor=64
|
||||||
|
|
||||||
|
# The port the chat server is started and listening on
|
||||||
|
# Used in chat and world servers
|
||||||
|
chat_server_port=2005
|
@ -2,9 +2,6 @@
|
|||||||
# If you fork this repository and/or make changes to the code, reflect that here to comply with AGPLv3
|
# If you fork this repository and/or make changes to the code, reflect that here to comply with AGPLv3
|
||||||
source=https://github.com/DarkflameUniverse/DarkflameServer
|
source=https://github.com/DarkflameUniverse/DarkflameServer
|
||||||
|
|
||||||
# Port to the chat server, same as in chatconfig.ini
|
|
||||||
chat_server_port=2005
|
|
||||||
|
|
||||||
# 0 or 1, should disable chat
|
# 0 or 1, should disable chat
|
||||||
disable_chat=0
|
disable_chat=0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user