aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/server/servernethooks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/server/servernethooks.cpp')
-rw-r--r--NorthstarDLL/server/servernethooks.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/NorthstarDLL/server/servernethooks.cpp b/NorthstarDLL/server/servernethooks.cpp
new file mode 100644
index 00000000..c5f4f75f
--- /dev/null
+++ b/NorthstarDLL/server/servernethooks.cpp
@@ -0,0 +1,16 @@
+#include "engine/r2engine.h"
+#include "shared/exploit_fixes/ns_limits.h"
+
+AUTOHOOK_INIT()
+
+AUTOHOOK(ProcessConnectionlessPacket, engine.dll + 0x117800, bool, , (void* a1, R2::netpacket_t* packet))
+{
+ if (!g_pServerLimits->CheckConnectionlessPacketLimits(packet))
+ return false;
+ return ProcessConnectionlessPacket(a1, packet);
+}
+
+ON_DLL_LOAD_RELIESON("engine.dll", ServerNetHooks, ConVar, (CModule module))
+{
+ AUTOHOOK_DISPATCH_MODULE(engine.dll)
+}