aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/securitypatches.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-26 15:13:45 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-26 15:13:45 +0100
commita4434a4db16c347d5453354c1a15555d168ec7b9 (patch)
tree976188f0fef133c1f8fc7ebf757296b0ea848a7e /NorthstarDedicatedTest/securitypatches.cpp
parente98fc31a93dfc9a14db7bb5510d25df0226d6fd3 (diff)
downloadNorthstarLauncher-a4434a4db16c347d5453354c1a15555d168ec7b9.tar.gz
NorthstarLauncher-a4434a4db16c347d5453354c1a15555d168ec7b9.zip
commandline struct change, dedicated refactor
Diffstat (limited to 'NorthstarDedicatedTest/securitypatches.cpp')
-rw-r--r--NorthstarDedicatedTest/securitypatches.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/securitypatches.cpp b/NorthstarDedicatedTest/securitypatches.cpp
index f13d778e..cbb5a292 100644
--- a/NorthstarDedicatedTest/securitypatches.cpp
+++ b/NorthstarDedicatedTest/securitypatches.cpp
@@ -3,6 +3,7 @@
#include "hookutils.h"
#include "concommand.h"
#include "dedicated.h"
+#include "tier0.h"
typedef bool(*IsValveModType)();
IsValveModType IsValveMod;
@@ -12,9 +13,7 @@ bool IsValveModHook()
// basically: by default r2 isn't set as a valve mod, meaning that m_bRestrictServerCommands is false
// this is HORRIBLE for security, because it means servers can run arbitrary concommands on clients
// especially since we have script commands this could theoretically be awful
-
- // todo: possibly have a commandline arg to disable this
- return true;
+ return !CommandLine()->CheckParm("-norestrictservercommands");
}
void InitialiseClientEngineSecurityPatches(HMODULE baseAddress)