clang-format everything

This commit is contained in:
Lion Kortlepel
2020-11-12 17:09:14 +01:00
parent c9f5ee9729
commit 58e65cf43f
29 changed files with 716 additions and 677 deletions

View File

@@ -1,35 +1,36 @@
///
/// Created by Anonymous275 on 7/28/2020
///
#include "Security/Enc.h"
#include "Client.hpp"
#include "Logger.h"
#include <string>
#include "Security/Enc.h"
#include <algorithm>
#include <string>
std::string CustomIP;
std::string GetSVer(){
std::string GetSVer() {
static std::string r = Sec("1.0");
return r;
}
std::string GetCVer(){
std::string GetCVer() {
static std::string r = Sec("1.70");
return r;
}
void Args(int argc, char* argv[]){
void Args(int argc, char* argv[]) {
info(Sec("BeamMP Server Running version ") + GetSVer());
if(argc > 1){
if (argc > 1) {
CustomIP = argv[1];
size_t n = std::count(CustomIP.begin(), CustomIP.end(), '.');
auto p = CustomIP.find_first_not_of(Sec(".0123456789"));
if(p != std::string::npos || n != 3 || CustomIP.substr(0,3) == Sec("127")){
if (p != std::string::npos || n != 3 || CustomIP.substr(0, 3) == Sec("127")) {
CustomIP.clear();
warn(Sec("IP Specified is invalid! Ignoring"));
}else info(Sec("Server started with custom IP"));
} else
info(Sec("Server started with custom IP"));
}
}
void InitServer(int argc, char* argv[]){
void InitServer(int argc, char* argv[]) {
InitLog();
Args(argc,argv);
Args(argc, argv);
CI = std::make_unique<ClientInterface>();
}