aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/server/serverchathooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/server/serverchathooks.cpp')
-rw-r--r--NorthstarDLL/server/serverchathooks.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/NorthstarDLL/server/serverchathooks.cpp b/NorthstarDLL/server/serverchathooks.cpp
index 57c2c31a..0ea3c2d2 100644
--- a/NorthstarDLL/server/serverchathooks.cpp
+++ b/NorthstarDLL/server/serverchathooks.cpp
@@ -3,6 +3,7 @@
#include "shared/exploit_fixes/ns_limits.h"
#include "squirrel/squirrel.h"
#include "server/r2server.h"
+#include "util/utils.h"
#include <rapidjson/document.h>
#include <rapidjson/stringbuffer.h>
@@ -40,6 +41,8 @@ AUTOHOOK(_CServerGameDLL__OnReceivedSayTextMessage, server.dll + 0x1595C0,
void, __fastcall, (CServerGameDLL* self, unsigned int senderPlayerId, const char* text, bool isTeam))
// clang-format on
{
+ NS::Utils::RemoveAsciiControlSequences(const_cast<char*>(text), true);
+
// MiniHook doesn't allow calling the base function outside of anywhere but the hook function.
// To allow bypassing the hook, isSkippingHook can be set.
if (bShouldCallSayTextHook)