diff --git a/apps/browser/main.cpp b/apps/browser/main.cpp index 00c8bd633..951685ad0 100644 --- a/apps/browser/main.cpp +++ b/apps/browser/main.cpp @@ -36,6 +36,11 @@ int main(int argc, char *argv[]) std::string addr = mgr.getString("address", "Master"); int port = mgr.getInt("port", "Master"); + // Is this an attempt to connect to the official master server at the old port? If so, + // redirect it to the correct port for the currently used fork of RakNet + if (Misc::StringUtils::ciEqual(addr, "master.tes3mp.com") && port == 25560) + port = 25561; + // initialize resources, if needed // Q_INIT_RESOURCE(resfile); diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index de9f12046..9f9096e3d 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -292,6 +292,14 @@ int main(int argc, char *argv[]) int masterPort = mgr.getInt("port", "MasterServer"); int updateRate = mgr.getInt("rate", "MasterServer"); + // Is this an attempt to connect to the official master server at the old port? If so, + // redirect it to the correct port for the currently used fork of RakNet + if (Misc::StringUtils::ciEqual(masterAddr, "master.tes3mp.com") && masterPort == 25560) + { + LOG_APPEND(Log::LOG_INFO, "- switching to port 25561 because the correct official master server for this version is on that port"); + masterPort = 25561; + } + networking.InitQuery(masterAddr, (unsigned short) masterPort); networking.getMasterClient()->SetMaxPlayers((unsigned) players); networking.getMasterClient()->SetUpdateRate((unsigned) updateRate);