From 46387373d1dd0170fff1d861f1ad7c07a140525a Mon Sep 17 00:00:00 2001 From: nobody-mb <18236959+nobody-mb@users.noreply.github.com> Date: Fri, 15 Jan 2021 12:26:40 -0600 Subject: [PATCH] show sixup in status (#3512) * show sixup in status * format sixup in status * str_copy --- src/engine/server/server.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 8a0fef07c..8b0736a04 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -2732,8 +2732,17 @@ 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); } - str_format(aBuf, sizeof(aBuf), "id=%d addr=<{%s}> name='%s' client=%d secure=%s flags=%d%s%s", - i, aAddrStr, pThis->m_aClients[i].m_aName, pThis->m_aClients[i].m_DDNetVersion, + char aClientStr[128]; + if(pThis->m_aClients[i].m_Sixup) + { + str_copy(aClientStr, "sixup", sizeof(aClientStr)); + } + 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, pThis->m_NetServer.HasSecurityToken(i) ? "yes" : "no", pThis->m_aClients[i].m_Flags, aDnsblStr, aAuthStr); } else