mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-17 14:12:19 +00:00
reformat all
This commit is contained in:
+10
-10
@@ -115,16 +115,16 @@ void GenerateConfig() {
|
||||
std::ofstream FileStream;
|
||||
FileStream.open(("Server.cfg"));
|
||||
FileStream << ("# This is the BeamMP Server Configuration File v0.60\n"
|
||||
"Debug = false # true or false to enable debug console output\n"
|
||||
"Private = true # Private?\n"
|
||||
"Port = 30814 # Port to run the server on UDP and TCP\n"
|
||||
"Cars = 1 # Max cars for every player\n"
|
||||
"MaxPlayers = 10 # Maximum Amount of Clients\n"
|
||||
"Map = \"/levels/gridmap/info.json\" # Default Map\n"
|
||||
"Name = \"BeamMP New Server\" # Server Name\n"
|
||||
"Desc = \"BeamMP Default Description\" # Server Description\n"
|
||||
"use = \"Resources\" # Resource file name\n"
|
||||
"AuthKey = \"\" # Auth Key");
|
||||
"Debug = false # true or false to enable debug console output\n"
|
||||
"Private = true # Private?\n"
|
||||
"Port = 30814 # Port to run the server on UDP and TCP\n"
|
||||
"Cars = 1 # Max cars for every player\n"
|
||||
"MaxPlayers = 10 # Maximum Amount of Clients\n"
|
||||
"Map = \"/levels/gridmap/info.json\" # Default Map\n"
|
||||
"Name = \"BeamMP New Server\" # Server Name\n"
|
||||
"Desc = \"BeamMP Default Description\" # Server Description\n"
|
||||
"use = \"Resources\" # Resource file name\n"
|
||||
"AuthKey = \"\" # Auth Key");
|
||||
FileStream.close();
|
||||
}
|
||||
void Default() {
|
||||
|
||||
@@ -56,15 +56,15 @@ std::string RunPromise(const std::string& IP, const std::string& R) {
|
||||
R = GenerateCall();
|
||||
if (!CustomIP.empty())
|
||||
R += "&ip=" + CustomIP;
|
||||
std::string link ="https://beammp.com/heartbeatv2";
|
||||
std::string link = "https://beammp.com/heartbeatv2";
|
||||
T = RunPromise(link, R);
|
||||
|
||||
if (T.substr(0,2) != "20") {
|
||||
if (T.substr(0, 2) != "20") {
|
||||
//Backend system refused server startup!
|
||||
std::this_thread::sleep_for(std::chrono::seconds(10));
|
||||
std::string Backup = "https://backup1.beammp.com/heartbeatv2";
|
||||
T = RunPromise(Backup, R);
|
||||
if (T.substr(0,2) != "20") {
|
||||
if (T.substr(0, 2) != "20") {
|
||||
warn("Backend system refused server! Server might not show in the public list");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,5 +34,6 @@ void InitRes() {
|
||||
}
|
||||
}
|
||||
std::replace(FileList.begin(), FileList.end(), '\\', '/');
|
||||
if(ModsLoaded)info("Loaded " + std::to_string(ModsLoaded) + " Mods");
|
||||
if (ModsLoaded)
|
||||
info("Loaded " + std::to_string(ModsLoaded) + " Mods");
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ void Args(int argc, char* argv[]) {
|
||||
if (p != std::string::npos || n != 3 || CustomIP.substr(0, 3) == ("127")) {
|
||||
CustomIP.clear();
|
||||
warn("IP Specified is invalid! Ignoring");
|
||||
} else info("Server started with custom IP");
|
||||
} else
|
||||
info("Server started with custom IP");
|
||||
}
|
||||
}
|
||||
void InitServer(int argc, char* argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user