diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-08-09 22:21:46 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-08-09 22:21:46 +0100 |
commit | 9a3e1ec2daf753106ee95d53719d94921d3b051f (patch) | |
tree | 954d8b75530d66c15fcfcf153a3a4f351e49ef8e /NorthstarDedicatedTest/squirrel.cpp | |
parent | 4d0e4679d05b146e5e43a1a707708c6451099c54 (diff) | |
download | NorthstarLauncher-9a3e1ec2daf753106ee95d53719d94921d3b051f.tar.gz NorthstarLauncher-9a3e1ec2daf753106ee95d53719d94921d3b051f.zip |
add mod localisation, say command and more masterserver stuff
Diffstat (limited to 'NorthstarDedicatedTest/squirrel.cpp')
-rw-r--r-- | NorthstarDedicatedTest/squirrel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/squirrel.cpp b/NorthstarDedicatedTest/squirrel.cpp index 90988eca..50e24075 100644 --- a/NorthstarDedicatedTest/squirrel.cpp +++ b/NorthstarDedicatedTest/squirrel.cpp @@ -163,7 +163,9 @@ void InitialiseServerSquirrel(HMODULE baseAddress) ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x799E0, &ScriptCompileErrorHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerSQCompileError)); // server compileerror function ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1D5C0, &CallScriptInitCallbackHook<SERVER>, reinterpret_cast<LPVOID*>(&ServerCallScriptInitCallback)); // server callscriptinitcallback function - RegisterConCommand("script", ExecuteCodeCommand<SERVER>, "Executes script code on the server vm", FCVAR_GAMEDLL); + // cheat and clientcmd_can_execute allows clients to execute this, but since it's unsafe we only allow it when cheats are enabled + // for script_client and script_ui, we don't use cheats, so clients can execute them on themselves all they want + RegisterConCommand("script", ExecuteCodeCommand<SERVER>, "Executes script code on the server vm", FCVAR_GAMEDLL | FCVAR_CLIENTCMD_CAN_EXECUTE | FCVAR_CHEAT); } // hooks |