Fix incorrect parameter order

This commit is contained in:
Leifa 2024-07-14 22:10:40 +02:00 committed by GitHub
parent 47c971fac1
commit 8498e30c02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
@ -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()});
}