add print on ping

This commit is contained in:
Lion Kortlepel
2021-02-17 13:02:52 +01:00
committed by Anonymous275
parent e04a569e33
commit 32038046d5
2 changed files with 2 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ void TPPSMonitor::operator()() {
for (auto& ClientToKick : TimedOutClients) {
TCPServer().ClientKick(*ClientToKick, "Timeout (no ping for >10 seconds)");
}
TimedOutClients.clear();
if (C == 0 || mInternalPPS == 0) {
Application::SetPPS("-");
} else {

View File

@@ -95,6 +95,7 @@ void TServer::GlobalParser(std::weak_ptr<TClient> Client, std::string Packet, TP
TCPServer.Respond(*LockedClient, ("p"), false);
TCPServer.UpdatePlayer(*LockedClient);
LockedClient->UpdatePingTime();
debug("ping received from " + LockedClient->GetName());
return;
case 'O':
if (Packet.length() > 1000) {