aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp
diff options
context:
space:
mode:
authorBarnaby <22575741+barnabwhy@users.noreply.github.com>2022-03-11 03:23:24 +0000
committerGitHub <noreply@github.com>2022-03-11 03:23:24 +0000
commit897eaa0761e1acaf7c9181f5a18d6b34ce6e2c76 (patch)
treef96c5390bc8861e9088711f5bf9912b822dc7db1 /NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp
parent9837c1f79a01fa200f0991ebf3c05e5954199d3e (diff)
downloadNorthstarLauncher-897eaa0761e1acaf7c9181f5a18d6b34ce6e2c76.tar.gz
NorthstarLauncher-897eaa0761e1acaf7c9181f5a18d6b34ce6e2c76.zip
Add check for player name correctness (#86)
* Add player auth failure when username is faked * Fix the action error? * Split name check into different function allows unique error message * Oops * Fix allow_insecure and kick message * Put it back cause i'm bad at programmig * format * Fix duplicated if statement maybe? Will need testing * Fail open + change to authData.username * Change name instead of kicking * Format * Remove unecessary borked name check * fail open in VerifyPlayerName if missing authData * Fix convar stuff * limit name length when copying from master server * 63 < 64 * please bob for the love of god this is like the third time i've had to do this
Diffstat (limited to 'NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp b/NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp
index 58d92ec6..7bad2773 100644
--- a/NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp
+++ b/NorthstarDedicatedTest/scriptservertoclientstringcommand.cpp
@@ -7,14 +7,15 @@
void ConCommand_ns_script_servertoclientstringcommand(const CCommand& arg)
{
- if (g_ClientSquirrelManager->sqvm && g_ClientSquirrelManager->setupfunc("NSClientCodeCallback_RecievedServerToClientStringCommand") != SQRESULT_ERROR)
+ if (g_ClientSquirrelManager->sqvm &&
+ g_ClientSquirrelManager->setupfunc("NSClientCodeCallback_RecievedServerToClientStringCommand") != SQRESULT_ERROR)
{
g_ClientSquirrelManager->pusharg(arg.ArgS());
g_ClientSquirrelManager->call(1); // todo: doesn't throw or log errors from within this, probably not great behaviour
}
}
-void InitialiseScriptServerToClientStringCommands(HMODULE baseAddress)
+void InitialiseScriptServerToClientStringCommands(HMODULE baseAddress)
{
if (IsDedicated())
return;
@@ -22,4 +23,4 @@ void InitialiseScriptServerToClientStringCommands(HMODULE baseAddress)
RegisterConCommand(
"ns_script_servertoclientstringcommand", ConCommand_ns_script_servertoclientstringcommand, "",
FCVAR_CLIENTDLL | FCVAR_SERVER_CAN_EXECUTE);
-} \ No newline at end of file
+}