diff --git a/src/packet/packet_ms.cpp b/src/packet/packet_ms.cpp index 4b37b02..de99513 100644 --- a/src/packet/packet_ms.cpp +++ b/src/packet/packet_ms.cpp @@ -127,7 +127,11 @@ AOPacket *PacketMS::validateIcPacket(AOClient &client) const // Doublepost prevention. Has to ignore blankposts and testimony commands. 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 = (area->statement() != -1 && (match.hasMatch() || l_incoming_msg == ">" || l_incoming_msg == "<")); + bool msg_is_testimony_cmd = (match.hasMatch() || l_incoming_msg == ">" || l_incoming_msg == "<"); + 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, + return l_invalid; // get it the hell outta here! if (l_incoming_msg == client.m_last_message && !msg_is_testimony_cmd) return l_invalid; if (l_incoming_msg == "" && area->blankpostingAllowed() == false) { @@ -299,7 +303,7 @@ AOPacket *PacketMS::validateIcPacket(AOClient &client) const } if (!l_pairing) { - if (client.m_pos == "wit" && area->status() != AreaData::Status::CASING) { + if (client.m_pos == "wit" && area->status() != AreaData::Status::CASING) { int pair_index = -1; for (int i = 0; i < 2; ++i) { if (area->m_autopair[i] == client.m_char_id) {