mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-01 18:19:20 +02:00
introduce to allow login only through custom otclient
This commit is contained in:
parent
4ff00fa8d7
commit
baa41a0f2f
@ -176,6 +176,14 @@ void ProtocolLogin::onRecvFirstMessage(NetworkMessage& msg)
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t accountNumberOtClientShallow = msg.get<uint32_t>();
|
||||
if (!accountNumber || accountNumberOtClientShallow != accountNumber) {
|
||||
std::ostringstream ss;
|
||||
ss << "Only clients with protocol " << getClientVersionString(g_game.getClientVersion()) << " allowed!";
|
||||
disconnectClient(ss.str(), version);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string password = msg.getString();
|
||||
if (password.empty()) {
|
||||
disconnectClient("Invalid password.", version);
|
||||
|
Loading…
x
Reference in New Issue
Block a user