MCPcopy Create free account
hub / github.com/ddnet/ddnet / ConShowIps

Method ConShowIps

src/engine/server/server.cpp:3979–3997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3977}
3978
3979void CServer::ConShowIps(IConsole::IResult *pResult, void *pUser)
3980{
3981 CServer *pServer = (CServer *)pUser;
3982
3983 if(pServer->m_RconClientId >= 0 && pServer->m_RconClientId < MAX_CLIENTS &&
3984 pServer->m_aClients[pServer->m_RconClientId].m_State != CServer::CClient::STATE_EMPTY)
3985 {
3986 if(pResult->NumArguments())
3987 {
3988 pServer->m_aClients[pServer->m_RconClientId].m_ShowIps = pResult->GetInteger(0);
3989 }
3990 else
3991 {
3992 char aStr[9];
3993 str_format(aStr, sizeof(aStr), "Value: %d", pServer->m_aClients[pServer->m_RconClientId].m_ShowIps);
3994 pServer->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aStr);
3995 }
3996 }
3997}
3998
3999void CServer::ConHideAuthStatus(IConsole::IResult *pResult, void *pUser)
4000{

Callers

nothing calls this directly

Calls 5

str_formatFunction · 0.85
NumArgumentsMethod · 0.80
GetIntegerMethod · 0.45
PrintMethod · 0.45
ConsoleMethod · 0.45

Tested by

no test coverage detected