summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/ProtocolRecognizer.cpp')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 8bfc18330..fa106342f 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -229,7 +229,7 @@ void cMultiVersionProtocol::SendDisconnect(cClientHandle & a_Client, const AStri
return;
}
- const AString Message = fmt::format(FMT_STRING("{{\"text\":\"{}\"}}"), EscapeString(a_Reason));
+ const AString Message = JsonUtils::SerializeSingleValueJsonObject("text", a_Reason);
const auto PacketID = GetPacketID(cProtocol::ePacketType::pktDisconnectDuringLogin);
cByteBuffer Out(
cByteBuffer::GetVarIntSize(PacketID) +