aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/shared/exploit_fixes
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2023-01-13 14:28:09 +0000
committerGitHub <noreply@github.com>2023-01-13 15:28:09 +0100
commit063260ca0b1f633cf120d79796fe7aa3329c1e26 (patch)
tree1bcc5516729168db6be4981b07115d30a8821da2 /NorthstarDLL/shared/exploit_fixes
parent8bddf5bfe83b52165c589b2dd5e544831a55231d (diff)
downloadNorthstarLauncher-063260ca0b1f633cf120d79796fe7aa3329c1e26.tar.gz
NorthstarLauncher-063260ca0b1f633cf120d79796fe7aa3329c1e26.zip
Execute cfgs before server startup for gamemode being run (#398)v1.12.0-rc5v1.12.0-rc4v1.12.0
* run cfg to initialise gamemode on startup * remove ; characters from mp_gamemode * exec using _Cmd_Exec_f to avoid issues with semicolons in gamemode names allowing additional commands to be run * run from cfg/server/ rather than cfg/ * fixup formatting
Diffstat (limited to 'NorthstarDLL/shared/exploit_fixes')
-rw-r--r--NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp
index e4430fd4..8cb956e6 100644
--- a/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp
+++ b/NorthstarDLL/shared/exploit_fixes/exploitfixes.cpp
@@ -266,8 +266,6 @@ bool, __fastcall, (const char* pModName)) // 48 83 EC 28 48 8B 0D ? ? ? ? 48 8D
}
// ratelimit stringcmds, and prevent remote clients from calling commands that they shouldn't
-bool (*CCommand__Tokenize)(CCommand& self, const char* pCommandString, R2::cmd_source_t commandSource);
-
// clang-format off
AUTOHOOK(CGameClient__ExecuteStringCommand, engine.dll + 0x1022E0,
bool, __fastcall, (R2::CBaseClient* self, uint32_t unknown, const char* pCommandString))
@@ -287,7 +285,7 @@ bool, __fastcall, (R2::CBaseClient* self, uint32_t unknown, const char* pCommand
memset(commandBuf, 0, sizeof(commandBuf));
CCommand tempCommand = *(CCommand*)&commandBuf;
- if (!CCommand__Tokenize(tempCommand, pCommandString, R2::cmd_source_t::kCommandSrcCode) || !tempCommand.ArgC())
+ if (!R2::CCommand__Tokenize(tempCommand, pCommandString, R2::cmd_source_t::kCommandSrcCode) || !tempCommand.ArgC())
return false;
ConCommand* command = R2::g_pCVar->FindCommand(tempCommand.Arg(0));
@@ -402,8 +400,6 @@ ON_DLL_LOAD("engine.dll", EngineExploitFixes, (CModule module))
{
AUTOHOOK_DISPATCH_MODULE(engine.dll)
- CCommand__Tokenize = module.Offset(0x418380).As<bool (*)(CCommand&, const char*, R2::cmd_source_t)>();
-
// allow client/ui to run clientcommands despite restricting servercommands
module.Offset(0x4FB65).Patch("EB 11");
module.Offset(0x4FBAC).Patch("EB 16");