mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-17 19:50:53 +00:00
possible fix for ping=?
This commit is contained in:
@@ -23,14 +23,18 @@ int OpenID(){
|
|||||||
}while (!found);
|
}while (!found);
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
void Respond(Client*c, const std::string& MSG, bool Rel){
|
void Respond(Client* c, const std::string& MSG, bool Rel) {
|
||||||
Assert(c);
|
Assert(c);
|
||||||
char C = MSG.at(0);
|
char C = MSG.at(0);
|
||||||
if(Rel || C == 'W' || C == 'Y' || C == 'V' || C == 'E'){
|
if (Rel || C == 'W' || C == 'Y' || C == 'V' || C == 'E') {
|
||||||
if(C == 'O' || C == 'T' || MSG.length() > 1000)SendLarge(c,MSG);
|
if (C == 'O' || C == 'T' || MSG.length() > 1000) {
|
||||||
else TCPSend(c,MSG);
|
SendLarge(c, MSG);
|
||||||
}else UDPSend(c,MSG);
|
} else {
|
||||||
|
TCPSend(c, MSG);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UDPSend(c, MSG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void SendToAll(Client*c, const std::string& Data, bool Self, bool Rel){
|
void SendToAll(Client*c, const std::string& Data, bool Self, bool Rel){
|
||||||
if (!Self)Assert(c);
|
if (!Self)Assert(c);
|
||||||
|
|||||||
@@ -172,10 +172,6 @@ std::string UDPRcvFromClient(sockaddr_in& client) {
|
|||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
Ret = Ret.substr(0,Rcv);
|
|
||||||
if(Ret.find("Zp") != std::string::npos && Ret.size() > 500){
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
return Ret.substr(0,Rcv);
|
return Ret.substr(0,Rcv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user