Skip to content

Commit

Permalink
Fix incorrect parameter order
Browse files Browse the repository at this point in the history
  • Loading branch information
TrickyLeifa authored Jul 14, 2024
1 parent 47c971f commit 8498e30
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/packet/packet_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ void PacketID::handlePacket(AreaData *area, AOClient &client) const
return;
}

if (!ConfigManager::webaoEnabled() && m_content[0] == "webAO") {
client.sendPacket("BD", {"WebAO is disabled on this server."});
client.m_socket->close();
return;
}

AOClient::ClientVersion version;
if (m_content[2] == akashi::get_protocol_version_string()) {
if (m_content[0] == akashi::get_protocol_version_string()) {
version.major = akashi::PROTOCOL_MAJOR_VERSION;
version.minor = akashi::PROTOCOL_MINOR_VERSION;
version.patch = akashi::PROTOCOL_PATCH_VERSION;
Expand All @@ -49,5 +43,11 @@ void PacketID::handlePacket(AreaData *area, AOClient &client) const
return;
}

if (!ConfigManager::webaoEnabled() && m_content[1] == "webAO") {
client.sendPacket("BD", {"WebAO is disabled on this server."});
client.m_socket->close();
return;
}

client.sendPacket("ID", {QString::number(client.clientId()), "akashi", QCoreApplication::applicationVersion()});
}

0 comments on commit 8498e30

Please sign in to comment.