mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-08-27 12:29:53 +00:00
Remove restricted region
This commit is contained in:
@@ -86,6 +86,7 @@ public:
|
||||
|
||||
static std::string GetBackendUrlForAuth();
|
||||
static std::string GetBackendUrlForSocketIO();
|
||||
static void TopLevelDomainFailed(bool failed);
|
||||
static std::string RegionToTopLevelDomain(const std::string region);
|
||||
static void CheckForUpdates();
|
||||
static std::array<uint8_t, 3> VersionStrToInts(const std::string& str);
|
||||
@@ -125,6 +126,8 @@ private:
|
||||
static inline bool mShutdown { false };
|
||||
static inline std::mutex mShutdownHandlersMutex {};
|
||||
static inline std::deque<TShutdownHandler> mShutdownHandlers {};
|
||||
static inline int mTLDIndex { 0 };
|
||||
static inline std::vector<std::string> mValidTLDs {"beammp.com", "beammp.ru"};
|
||||
|
||||
static inline Version mVersion { 3, 9, 3 };
|
||||
};
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// BeamMP, the BeamNG.drive multiplayer mod.
|
||||
// Copyright (C) 2024 BeamMP Ltd., BeamMP team and contributors.
|
||||
//
|
||||
// BeamMP Ltd. can be contacted by electronic mail via contact@beammp.com.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published
|
||||
// by the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#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"};
|
||||
};
|
||||
Reference in New Issue
Block a user