mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2025-08-18 10:55:36 +00:00
possible fix for ping=?
This commit is contained in:
parent
cdb2624367
commit
be7e2f1616
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user