aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/masterserver.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-04-12 01:56:04 +0100
committerGitHub <noreply@github.com>2022-04-12 01:56:04 +0100
commitbd10ff7cc472d265650cd7c4fc47037195ba4008 (patch)
treea3949ccd0a252cb7564bd0ea40f108a4e18eecad /NorthstarDedicatedTest/masterserver.cpp
parentb60432c85cb6e37c4a8bcdddeded75d3b71213b3 (diff)
downloadNorthstarLauncher-bd10ff7cc472d265650cd7c4fc47037195ba4008.tar.gz
NorthstarLauncher-bd10ff7cc472d265650cd7c4fc47037195ba4008.zip
make curl logging optional (#141)
Diffstat (limited to 'NorthstarDedicatedTest/masterserver.cpp')
-rw-r--r--NorthstarDedicatedTest/masterserver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp
index ab6388c3..63ae49a9 100644
--- a/NorthstarDedicatedTest/masterserver.cpp
+++ b/NorthstarDedicatedTest/masterserver.cpp
@@ -25,6 +25,8 @@ ConVar* Cvar_ns_server_name;
ConVar* Cvar_ns_server_desc;
ConVar* Cvar_ns_server_password;
+ConVar* Cvar_ns_curl_log_enable;
+
// Source ConVar
ConVar* Cvar_hostname;
@@ -169,7 +171,7 @@ RemoteServerInfo::RemoteServerInfo(
void MasterServerManager::SetCommonHttpClientOptions(CURL* curl)
{
curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, Cvar_ns_curl_log_enable->GetBool());
curl_easy_setopt(curl, CURLOPT_USERAGENT, &NSUserAgent);
// curl_easy_setopt(curl, CURLOPT_STDERR, stdout);
if (CommandLine()->FindParm("-msinsecure")) // TODO: this check doesn't seem to work
@@ -1276,6 +1278,8 @@ void InitialiseSharedMasterServer(HMODULE baseAddress)
Cvar_ns_report_server_to_masterserver = new ConVar("ns_report_server_to_masterserver", "1", FCVAR_GAMEDLL, "");
Cvar_ns_report_sp_server_to_masterserver = new ConVar("ns_report_sp_server_to_masterserver", "0", FCVAR_GAMEDLL, "");
+ Cvar_ns_curl_log_enable = new ConVar("ns_curl_log_enable", "0", FCVAR_NONE, "");
+
Cvar_hostname = *(ConVar**)((char*)baseAddress + 0x1315bae8);
g_MasterServerManager = new MasterServerManager;