12#include "../../stdafx.h"
14#include "../../string_func.h"
16#include "../../safeguards.h"
25 return GetEnv(
"OTTD_COORDINATOR_CS").value_or(
"coordinator.openttd.org");
35 return GetEnv(
"OTTD_STUN_CS").value_or(
"stun.openttd.org");
45 return GetEnv(
"OTTD_CONTENT_SERVER_CS").value_or(
"content.openttd.org");
55 return GetEnv(
"OTTD_CONTENT_MIRROR_URI").value_or(
"https://binaries.openttd.org/bananas");
65 return GetEnv(
"OTTD_SURVEY_URI").value_or(
"https://survey-participate.openttd.org/");
std::string_view NetworkStunConnectionString()
Get the connection string for the STUN server from the environment variable OTTD_STUN_CS,...
std::string_view NetworkCoordinatorConnectionString()
Get the connection string for the game coordinator from the environment variable OTTD_COORDINATOR_CS,...
std::string_view NetworkContentMirrorUriString()
Get the URI string for the content mirror from the environment variable OTTD_CONTENT_MIRROR_URI,...
std::string_view NetworkSurveyUriString()
Get the URI string for the survey from the environment variable OTTD_SURVEY_URI, or when it has not b...
std::string_view NetworkContentServerConnectionString()
Get the connection string for the content server from the environment variable OTTD_CONTENT_SERVER_CS...
std::optional< std::string_view > GetEnv(const char *variable)
Get the environment variable using std::getenv and when it is an empty string (or nullptr),...