aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/shared
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2023-03-05 16:19:15 -0500
committerpg9182 <96569817+pg9182@users.noreply.github.com>2023-04-17 14:50:10 -0400
commit2c889a0bc06b19f5842d002f5d671aaab8c3b419 (patch)
treea04d62c61abcd6c7ddb4fd9b20e16b86b1a27d4d /NorthstarDLL/shared
parent450d0b1ed437cf37b4309af952af8904f3f07768 (diff)
downloadNorthstarLauncher-2c889a0bc06b19f5842d002f5d671aaab8c3b419.tar.gz
NorthstarLauncher-2c889a0bc06b19f5842d002f5d671aaab8c3b419.zip
Extract ProcessConnectionlessPacket hook to separate file
Diffstat (limited to 'NorthstarDLL/shared')
-rw-r--r--NorthstarDLL/shared/exploit_fixes/ns_limits.cpp7
-rw-r--r--NorthstarDLL/shared/exploit_fixes/ns_limits.h1
2 files changed, 3 insertions, 5 deletions
diff --git a/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp b/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp
index 35756044..e69ef41c 100644
--- a/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp
+++ b/NorthstarDLL/shared/exploit_fixes/ns_limits.cpp
@@ -144,10 +144,7 @@ char, __fastcall, (void* self, void* buf))
return ret;
}
-// clang-format off
-AUTOHOOK(ProcessConnectionlessPacket, engine.dll + 0x117800,
-bool, , (void* a1, R2::netpacket_t* packet))
-// clang-format on
+bool ServerLimitsManager::CheckConnectionlessPacketLimits(R2::netpacket_t* packet)
{
static const ConVar* Cvar_net_data_block_enabled = R2::g_pCVar->FindVar("net_data_block_enabled");
@@ -196,7 +193,7 @@ bool, , (void* a1, R2::netpacket_t* packet))
}
}
- return ProcessConnectionlessPacket(a1, packet);
+ return true;
}
// this is weird and i'm not sure if it's correct, so not using for now
diff --git a/NorthstarDLL/shared/exploit_fixes/ns_limits.h b/NorthstarDLL/shared/exploit_fixes/ns_limits.h
index bbc0a85f..d1f7f2ed 100644
--- a/NorthstarDLL/shared/exploit_fixes/ns_limits.h
+++ b/NorthstarDLL/shared/exploit_fixes/ns_limits.h
@@ -46,6 +46,7 @@ class ServerLimitsManager
void RemovePlayer(R2::CBaseClient* player);
bool CheckStringCommandLimits(R2::CBaseClient* player);
bool CheckChatLimits(R2::CBaseClient* player);
+ bool CheckConnectionlessPacketLimits(R2::netpacket_t* packet);
};
extern ServerLimitsManager* g_pServerLimits;