aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/clientauthhooks.cpp
diff options
context:
space:
mode:
authorNorthstar <northstar@northstar.tf>2022-02-03 22:09:08 -0300
committerBarichello <artur@barichello.me>2022-02-03 22:09:08 -0300
commit75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch)
treec9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/clientauthhooks.cpp
parente9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff)
downloadNorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz
NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip
Format project
Diffstat (limited to 'NorthstarDedicatedTest/clientauthhooks.cpp')
-rw-r--r--NorthstarDedicatedTest/clientauthhooks.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/clientauthhooks.cpp b/NorthstarDedicatedTest/clientauthhooks.cpp
index a139504d..41f0fd32 100644
--- a/NorthstarDedicatedTest/clientauthhooks.cpp
+++ b/NorthstarDedicatedTest/clientauthhooks.cpp
@@ -6,7 +6,7 @@
#include "masterserver.h"
#include "convar.h"
-typedef void(*AuthWithStryderType)(void* a1);
+typedef void (*AuthWithStryderType)(void* a1);
AuthWithStryderType AuthWithStryder;
ConVar* Cvar_ns_has_agreed_to_send_token;
@@ -23,7 +23,8 @@ void AuthWithStryderHook(void* a1)
if (!g_MasterServerManager->m_bOriginAuthWithMasterServerDone && Cvar_ns_has_agreed_to_send_token->m_nValue != DISAGREED_TO_SEND_TOKEN)
{
// if player has agreed to send token and we aren't already authing, try to auth
- if (Cvar_ns_has_agreed_to_send_token->m_nValue == AGREED_TO_SEND_TOKEN && !g_MasterServerManager->m_bOriginAuthWithMasterServerInProgress)
+ if (Cvar_ns_has_agreed_to_send_token->m_nValue == AGREED_TO_SEND_TOKEN &&
+ !g_MasterServerManager->m_bOriginAuthWithMasterServerInProgress)
g_MasterServerManager->AuthenticateOriginWithMasterServer(g_LocalPlayerUserID, g_LocalPlayerOriginToken);
// invalidate key so auth will fail
@@ -39,7 +40,9 @@ void InitialiseClientAuthHooks(HMODULE baseAddress)
return;
// this cvar will save to cfg once initially agreed with
- Cvar_ns_has_agreed_to_send_token = RegisterConVar("ns_has_agreed_to_send_token", "0", FCVAR_ARCHIVE_PLAYERPROFILE, "whether the user has agreed to send their origin token to the northstar masterserver");
+ Cvar_ns_has_agreed_to_send_token = RegisterConVar(
+ "ns_has_agreed_to_send_token", "0", FCVAR_ARCHIVE_PLAYERPROFILE,
+ "whether the user has agreed to send their origin token to the northstar masterserver");
HookEnabler hook;
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1843A0, &AuthWithStryderHook, reinterpret_cast<LPVOID*>(&AuthWithStryder));