mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
clean up temp commands on logout in the client
This commit is contained in:
parent
ec4bb94537
commit
de3e94d901
|
@ -546,6 +546,7 @@ void CClient::DisconnectWithReason(const char *pReason)
|
||||||
|
|
||||||
//
|
//
|
||||||
m_RconAuthed = 0;
|
m_RconAuthed = 0;
|
||||||
|
m_UseTempRconCommands = 0;
|
||||||
m_pConsole->DeregisterTempAll();
|
m_pConsole->DeregisterTempAll();
|
||||||
m_NetClient.Disconnect(pReason);
|
m_NetClient.Disconnect(pReason);
|
||||||
SetState(IClient::STATE_OFFLINE);
|
SetState(IClient::STATE_OFFLINE);
|
||||||
|
@ -1153,9 +1154,12 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket)
|
||||||
int Result = Unpacker.GetInt();
|
int Result = Unpacker.GetInt();
|
||||||
if(Unpacker.Error() == 0)
|
if(Unpacker.Error() == 0)
|
||||||
m_RconAuthed = Result;
|
m_RconAuthed = Result;
|
||||||
|
int Old = m_UseTempRconCommands;
|
||||||
m_UseTempRconCommands = Unpacker.GetInt();
|
m_UseTempRconCommands = Unpacker.GetInt();
|
||||||
if(Unpacker.Error() != 0)
|
if(Unpacker.Error() != 0)
|
||||||
m_UseTempRconCommands = 0;
|
m_UseTempRconCommands = 0;
|
||||||
|
if(Old != 0 && m_UseTempRconCommands == 0)
|
||||||
|
m_pConsole->DeregisterTempAll();
|
||||||
}
|
}
|
||||||
else if(Msg == NETMSG_RCON_LINE)
|
else if(Msg == NETMSG_RCON_LINE)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue