mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed crash on dbg_msg on unauthed client trying rcon, fixed infinite loop (same event)
This commit is contained in:
parent
9cf90fff77
commit
dc22007c24
|
@ -812,11 +812,12 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
||||||
|
|
||||||
if(Unpacker.Error() == 0/* && m_aClients[ClientId].m_Authed*/)
|
if(Unpacker.Error() == 0/* && m_aClients[ClientId].m_Authed*/)
|
||||||
{
|
{
|
||||||
Console()->RegisterAlternativePrintCallback(0, 0);
|
|
||||||
|
|
||||||
char aBuf[256];
|
char aBuf[256];
|
||||||
if(m_aClients[ClientId].m_Authed >= 0)
|
if(m_aClients[ClientId].m_Authed >= 0)
|
||||||
{
|
{
|
||||||
|
Console()->RegisterAlternativePrintCallback(0, 0);
|
||||||
|
|
||||||
str_format(aBuf, sizeof(aBuf), "'%s' ClientId=%d Level=%d Rcon='%s'", ClientName(ClientId), ClientId, m_aClients[ClientId].m_Authed, pCmd);
|
str_format(aBuf, sizeof(aBuf), "'%s' ClientId=%d Level=%d Rcon='%s'", ClientName(ClientId), ClientId, m_aClients[ClientId].m_Authed, pCmd);
|
||||||
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBuf);
|
Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "server", aBuf);
|
||||||
|
|
||||||
|
@ -833,7 +834,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dbg_msg("server", "'%s' client tried rcon command ('pCmd') without permissions. Cid=%x ip=%d.%d.%d.%d",
|
dbg_msg("server", "'%s' client tried rcon command ('%s') without permissions. Cid=%x ip=%d.%d.%d.%d",
|
||||||
ClientName(ClientId),
|
ClientName(ClientId),
|
||||||
pCmd,
|
pCmd,
|
||||||
ClientId,
|
ClientId,
|
||||||
|
|
Loading…
Reference in a new issue