possible fix for ping=?

This commit is contained in:
Lion Kortlepel 2020-11-12 01:33:35 +01:00
parent cdb2624367
commit be7e2f1616
2 changed files with 10 additions and 10 deletions

View File

@ -23,14 +23,18 @@ int OpenID(){
}while (!found);
return ID;
}
void Respond(Client*c, const std::string& MSG, bool Rel){
void Respond(Client* c, const std::string& MSG, bool Rel) {
Assert(c);
char C = MSG.at(0);
if(Rel || C == 'W' || C == 'Y' || C == 'V' || C == 'E'){
if(C == 'O' || C == 'T' || MSG.length() > 1000)SendLarge(c,MSG);
else TCPSend(c,MSG);
}else UDPSend(c,MSG);
if (Rel || C == 'W' || C == 'Y' || C == 'V' || C == 'E') {
if (C == 'O' || C == 'T' || MSG.length() > 1000) {
SendLarge(c, MSG);
} else {
TCPSend(c, MSG);
}
} else {
UDPSend(c, MSG);
}
}
void SendToAll(Client*c, const std::string& Data, bool Self, bool Rel){
if (!Self)Assert(c);

View File

@ -172,10 +172,6 @@ std::string UDPRcvFromClient(sockaddr_in& client) {
#endif // WIN32
return "";
}
Ret = Ret.substr(0,Rcv);
if(Ret.find("Zp") != std::string::npos && Ret.size() > 500){
abort();
}
return Ret.substr(0,Rcv);
}