mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-06-23 13:02:25 +00:00
Add region tld
This commit is contained in:
@@ -20,6 +20,7 @@ struct Options {
|
||||
bool no_update = false;
|
||||
bool no_launch = false;
|
||||
const char* user_path = nullptr;
|
||||
std::string region;
|
||||
const char **game_arguments = nullptr;
|
||||
int game_arguments_length = 0;
|
||||
const char** argv = nullptr;
|
||||
|
||||
+11
-1
@@ -336,4 +336,14 @@ namespace Utils {
|
||||
throw std::runtime_error("Game disconnected");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
inline std::string RegionToTopLevelDomain(const std::string region) {
|
||||
if (region == "Restricted") {
|
||||
return "beammp.ru";
|
||||
}
|
||||
else if (region == "Developer") {
|
||||
return "beammp.dev";
|
||||
}
|
||||
return "beammp.com"; // Global
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user