mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 23:35:41 +00:00
Ready for release
This commit is contained in:
parent
e7c1bdd872
commit
69362b2dfd
@ -45,7 +45,7 @@ std::string HTTP(const std::string &DID){
|
||||
int pos = a.find('"');
|
||||
if(pos != std::string::npos){
|
||||
return a.substr(pos+1,a.find('"',pos+1)-2);
|
||||
}else if(a == "[]")return ""; //Member
|
||||
}else if(a == "[]")return "Member";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@ -92,6 +92,11 @@ void Identification(SOCKET TCPSock){
|
||||
Name = Res.substr(2,Res.find(':')-2);
|
||||
DID = Res.substr(Res.find(':')+1);
|
||||
Role = HTTP(DID);
|
||||
if(Role.empty() || Role.find("Error") != std::string::npos){
|
||||
closesocket(TCPSock);
|
||||
return;
|
||||
}
|
||||
|
||||
for(Client*c: Clients){
|
||||
if(c->GetDID() == DID){
|
||||
closesocket(c->GetTCPSock());
|
||||
@ -99,10 +104,7 @@ void Identification(SOCKET TCPSock){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(Role.empty() || Role.find("Error") != std::string::npos){
|
||||
closesocket(TCPSock);
|
||||
return;
|
||||
}
|
||||
|
||||
if(Debug)debug("Name -> " + Name + ", Role -> " + Role + ", ID -> " + DID);
|
||||
if(Role == "MDEV"){
|
||||
CreateClient(TCPSock,Name,DID,Role);
|
||||
|
@ -15,7 +15,7 @@ void ParseConfig();
|
||||
void addToLog(const std::string& Data);
|
||||
//void ServerMain(int Port, int MaxClients);
|
||||
void HeartbeatInit();
|
||||
std::string ServerVersion = "0.45";
|
||||
std::string ServerVersion = "0.46";
|
||||
std::string ClientVersion = "1.46";
|
||||
std::string CustomIP;
|
||||
void HandleResources(std::string path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user