Also display DDNet version for 0.7 clients

This commit is contained in:
heinrich5991 2021-01-15 22:39:18 +01:00
parent 46387373d1
commit b66e090425

View file

@ -2732,17 +2732,13 @@ void CServer::ConStatus(IConsole::IResult *pResult, void *pUser)
str_format(aAuthStr, sizeof(aAuthStr), " key=%s %s", pThis->m_AuthManager.KeyIdent(pThis->m_aClients[i].m_AuthKey), pAuthStr);
}
char aClientStr[128];
const char *pClientPrefix = "";
if(pThis->m_aClients[i].m_Sixup)
{
str_copy(aClientStr, "sixup", sizeof(aClientStr));
pClientPrefix = "0.7:";
}
else
{
str_format(aClientStr, sizeof(aClientStr), "%d", pThis->m_aClients[i].m_DDNetVersion);
}
str_format(aBuf, sizeof(aBuf), "id=%d addr=<{%s}> name='%s' client=%s secure=%s flags=%d%s%s",
i, aAddrStr, pThis->m_aClients[i].m_aName, aClientStr,
str_format(aBuf, sizeof(aBuf), "id=%d addr=<{%s}> name='%s' client=%s%d secure=%s flags=%d%s%s",
i, aAddrStr, pThis->m_aClients[i].m_aName, pClientPrefix, pThis->m_aClients[i].m_DDNetVersion,
pThis->m_NetServer.HasSecurityToken(i) ? "yes" : "no", pThis->m_aClients[i].m_Flags, aDnsblStr, aAuthStr);
}
else