From de3e94d9019ac9004e622a6e87535f51017fec46 Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 30 Dec 2011 19:21:00 +0100 Subject: [PATCH] clean up temp commands on logout in the client --- src/engine/client/client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index c3bd770cb..90cb172df 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -546,6 +546,7 @@ void CClient::DisconnectWithReason(const char *pReason) // m_RconAuthed = 0; + m_UseTempRconCommands = 0; m_pConsole->DeregisterTempAll(); m_NetClient.Disconnect(pReason); SetState(IClient::STATE_OFFLINE); @@ -1153,9 +1154,12 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket) int Result = Unpacker.GetInt(); if(Unpacker.Error() == 0) m_RconAuthed = Result; + int Old = m_UseTempRconCommands; m_UseTempRconCommands = Unpacker.GetInt(); if(Unpacker.Error() != 0) m_UseTempRconCommands = 0; + if(Old != 0 && m_UseTempRconCommands == 0) + m_pConsole->DeregisterTempAll(); } else if(Msg == NETMSG_RCON_LINE) {