Remove restricted region

This commit is contained in:
SaltySnail
2026-06-25 18:35:42 +02:00
parent 52e607cf2c
commit d7277151cc
8 changed files with 104 additions and 26 deletions
+21
View File
@@ -0,0 +1,21 @@
/*
Copyright (C) 2024 BeamMP Ltd., BeamMP team and contributors.
Licensed under AGPL-3.0 (or later), see <https://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include <vector>
#include <string>
#include <array>
class RegionHandler final {
public:
RegionHandler() = delete;
static void TopLevelDomainFailed(bool failed);
static std::string RegionToTopLevelDomain(const std::string region);
private:
static inline unsigned int mRegionIndex { 0 };
const static inline std::array<std::string, 2> mValidTLDs {"beammp.com", "beammp.ru"};
};
-10
View File
@@ -336,14 +336,4 @@ 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
}
};