diff --git a/src/aoclient.h b/src/aoclient.h index 3d36207..b66f8d1 100644 --- a/src/aoclient.h +++ b/src/aoclient.h @@ -539,6 +539,8 @@ class AOClient : public QObject */ bool m_authenticated = false; + bool m_spoke = false; + /** * @brief The ACL role identifier, used to determine what ACL role the client is linked to. */ diff --git a/src/packet/packet_ms.cpp b/src/packet/packet_ms.cpp index ce962a4..f69e2bb 100644 --- a/src/packet/packet_ms.cpp +++ b/src/packet/packet_ms.cpp @@ -83,7 +83,8 @@ AOPacket *PacketMS::validateIcPacket(AOClient &client) const << "4" << "5"; QString l_incoming_deskmod = l_incoming_args[0].toString(); - client.hide_desk = l_incoming_deskmod == "0" || client.hide_desk; + bool wit_joined_while_area_idle = !client.m_spoke && l_incoming_args[5].toString().replace("../", "").replace("..\\", "") == "wit" && area->status() != AreaData::Status::CASING; + client.hide_desk = wit_joined_while_area_idle; if(client.hide_desk) l_incoming_deskmod = "0"; if (allowed_desk_mods.contains(l_incoming_deskmod)) { // **WARNING : THIS IS A HACK!** @@ -130,6 +131,7 @@ AOPacket *PacketMS::validateIcPacket(AOClient &client) const QString l_incoming_msg = client.dezalgo(l_incoming_args[4].toString().trimmed()); QRegularExpressionMatch match = isTestimonyJumpCommand(client.decodeMessage(l_incoming_msg)); bool msg_is_testimony_cmd = (match.hasMatch() || l_incoming_msg == ">" || l_incoming_msg == "<"); + client.m_spoke = true; if (!client.m_last_message.isEmpty() // If the last message you sent isn't empty, && l_incoming_msg == client.m_last_message // and it matches the one you're sending, && !msg_is_testimony_cmd) // and it's not a testimony command,