mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-02 10:39: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;
|
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();
|
std::string password = msg.getString();
|
||||||
if (password.empty()) {
|
if (password.empty()) {
|
||||||
disconnectClient("Invalid password.", version);
|
disconnectClient("Invalid password.", version);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user