From 91b1f62fa09774d44685c2bc885a90f96748e27e Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Sun, 17 Jan 2021 17:44:48 +0100 Subject: [PATCH] Send logout packet after using timeout protection Only send the logout packet if you're actually logged in. Fixes #3490. Supersedes #3495. --- src/engine/server/server.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index b0788fc9c..720863f5c 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -3629,6 +3629,10 @@ bool CServer::SetTimedOut(int ClientID, int OrigID) } m_aClients[ClientID].m_Sixup = m_aClients[OrigID].m_Sixup; + if(m_aClients[OrigID].m_Authed != AUTHED_NO) + { + LogoutClient(ClientID, "Timeout Protection"); + } DelClientCallback(OrigID, "Timeout Protection used", this); m_aClients[ClientID].m_Authed = AUTHED_NO; m_aClients[ClientID].m_Flags = m_aClients[OrigID].m_Flags;