fix: the chat server listens with the password the servers share

Only world servers connect to the chat server. It now starts as an
internal server, the same way the master server does, and the world
servers connect to it with the password they already use for the
master server.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 12:54:57 -06:00
parent e8479cd6e5
commit 4022a7c133
2 changed files with 4 additions and 3 deletions

View File

@@ -130,7 +130,8 @@ int main(int argc, char** argv) {
const auto externalIPString = Game::config->GetValue("external_ip");
if (!externalIPString.empty()) ourIP = externalIPString;
Game::server = new dServer(ourIP, ourPort, 0, maxClients, false, true, Game::logger, masterIP, masterPort, ServiceType::CHAT, Game::config, &Game::lastSignal, masterPassword);
// Only other servers connect to chat, so it listens with the password the servers share
Game::server = new dServer(ourIP, ourPort, 0, maxClients, true /* Is internal */, true /* Use encryption */, Game::logger, masterIP, masterPort, ServiceType::CHAT, Game::config, &Game::lastSignal, masterPassword);
const bool dontGenerateDCF = GeneralUtils::TryParse<bool>(Game::config->GetValue("dont_generate_dcf")).value_or(false);
Game::chatFilter = new dChatFilter(Game::assetManager->GetResPath().string() + "/chatplus_en_us", dontGenerateDCF);