diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-04-12 01:56:04 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-05-26 22:46:23 +0200 |
commit | eb86a4f1e424595cabe8bd34f970aa24eddbea37 (patch) | |
tree | a3a77bf0f22f4428f2ecff66ccc8fb28b2ef76bf | |
parent | dbf79774fe0a675db55763311fc55267c36f7bef (diff) | |
download | NorthstarLauncher-1.7.2-rc1.tar.gz NorthstarLauncher-1.7.2-rc1.zip |
make curl logging optional (#141)v1.7.2-rc1v1.7.21.7.X
-rw-r--r-- | NorthstarDedicatedTest/masterserver.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp index 9c719157..050f7322 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; |