mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
(untested)
This commit is contained in:
parent
543b231a80
commit
ff2f5cb2ce
@ -869,6 +869,19 @@ void HandlePacket(Packet* packet) {
|
|||||||
std::string theirFdbChecksum = PacketUtils::ReadString(packet->length - 33, packet, false);
|
std::string theirFdbChecksum = PacketUtils::ReadString(packet->length - 33, packet, false);
|
||||||
|
|
||||||
if (Game::config->GetValue("check_fdb") == "1" && fdbChecksum != "") { // if fdbChecksum is empty, likely means we are a character server.
|
if (Game::config->GetValue("check_fdb") == "1" && fdbChecksum != "") { // if fdbChecksum is empty, likely means we are a character server.
|
||||||
|
uint32_t gmLevel = 0;
|
||||||
|
sql::PreparedStatement* stmt = Database::CreatePreppedStmt("SELECT gm_level FROM accounts WHERE name=? LIMIT 1;");
|
||||||
|
stmt->setString(1, username.c_str());
|
||||||
|
|
||||||
|
sql::ResultSet* res = stmt->executeQuery();
|
||||||
|
while (res->next()) {
|
||||||
|
gmLevel = res->getInt(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete stmt;
|
||||||
|
delete res;
|
||||||
|
|
||||||
|
if (gmLevel != 9) {
|
||||||
Game::logger->Log("WorldServer", "Got client checksum %s and we have server checksum %s. \n", theirFdbChecksum.c_str(), fdbChecksum.c_str());
|
Game::logger->Log("WorldServer", "Got client checksum %s and we have server checksum %s. \n", theirFdbChecksum.c_str(), fdbChecksum.c_str());
|
||||||
if (theirFdbChecksum != fdbChecksum) {
|
if (theirFdbChecksum != fdbChecksum) {
|
||||||
Game::logger->Log("WorldServer", "Client checksum does not match server checksum.\n");
|
Game::logger->Log("WorldServer", "Client checksum does not match server checksum.\n");
|
||||||
@ -876,6 +889,7 @@ void HandlePacket(Packet* packet) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Request the session info from Master:
|
//Request the session info from Master:
|
||||||
CBITSTREAM;
|
CBITSTREAM;
|
||||||
|
Loading…
Reference in New Issue
Block a user