reformat all

This commit is contained in:
Lion Kortlepel
2020-12-23 23:34:30 +01:00
parent 0f4c08c068
commit a944565fb9
13 changed files with 171 additions and 147 deletions
+10 -10
View File
@@ -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() {
+3 -3
View File
@@ -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");
}
}
+2 -1
View File
@@ -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");
}
+2 -1
View File
@@ -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[]) {