diff --git a/apps/browser/netutils/QueryClient.cpp b/apps/browser/netutils/QueryClient.cpp index 416d2d661..bd6faeb60 100644 --- a/apps/browser/netutils/QueryClient.cpp +++ b/apps/browser/netutils/QueryClient.cpp @@ -6,6 +6,7 @@ #include #include #include +#include using namespace RakNet; using namespace std; @@ -124,7 +125,8 @@ MASTER_PACKETS QueryClient::GetAnswer() ConnectionState QueryClient::Connect() { - ConnectionAttemptResult car = peer->Connect(masterAddr.ToString(false), masterAddr.GetPort(), "pass", strlen("pass"), 0, 0, 5, 500); + ConnectionAttemptResult car = peer->Connect(masterAddr.ToString(false), masterAddr.GetPort(), TES3MP_MASTERSERVER_PASSW, + strlen(TES3MP_MASTERSERVER_PASSW), 0, 0, 5, 500); while (true) { diff --git a/apps/master/MasterServer.cpp b/apps/master/MasterServer.cpp index b0f925331..430cefa81 100644 --- a/apps/master/MasterServer.cpp +++ b/apps/master/MasterServer.cpp @@ -11,6 +11,7 @@ #include #include #include +#include using namespace RakNet; using namespace std; @@ -23,7 +24,7 @@ MasterServer::MasterServer(unsigned short maxConnections, unsigned short port) peer->Startup(maxConnections, &sockdescr, 1, 1000); peer->SetMaximumIncomingConnections(maxConnections); - peer->SetIncomingPassword("pass", (int) strlen("pass")); + peer->SetIncomingPassword(TES3MP_MASTERSERVER_PASSW, (int) strlen(TES3MP_MASTERSERVER_PASSW)); run = false; } diff --git a/apps/openmw-mp/MasterClient.cpp b/apps/openmw-mp/MasterClient.cpp index 1d900e413..306feb9fd 100644 --- a/apps/openmw-mp/MasterClient.cpp +++ b/apps/openmw-mp/MasterClient.cpp @@ -155,7 +155,8 @@ bool MasterClient::Process(RakNet::Packet *packet) void MasterClient::Send(mwmp::PacketMasterAnnounce::Func func) { - peer->Connect(masterServer.ToString(false), masterServer.GetPort(), "pass", strlen("pass"), 0, 0, 5, 500); + peer->Connect(masterServer.ToString(false), masterServer.GetPort(), TES3MP_MASTERSERVER_PASSW, + strlen(TES3MP_MASTERSERVER_PASSW), 0, 0, 5, 500); bool waitForConnect = true; while (waitForConnect) { diff --git a/components/openmw-mp/Version.hpp b/components/openmw-mp/Version.hpp index d770fc66f..0c8cba3ed 100644 --- a/components/openmw-mp/Version.hpp +++ b/components/openmw-mp/Version.hpp @@ -9,5 +9,6 @@ #define TES3MP_PROTO_VERSION 7 #define TES3MP_DEFAULT_PASSW "SuperPassword" +#define TES3MP_MASTERSERVER_PASSW "12345" #endif //OPENMW_VERSION_HPP