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

Method GetAuthedState

src/engine/server/server.cpp:649–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647}
648
649int CServer::GetAuthedState(int ClientId) const
650{
651 if(ClientId == IConsole::CLIENT_ID_UNSPECIFIED)
652 return AUTHED_ADMIN;
653 if(ClientId == IConsole::CLIENT_ID_GAME)
654 return AUTHED_ADMIN;
655 if(ClientId == IConsole::CLIENT_ID_NO_GAME)
656 return AUTHED_ADMIN;
657 dbg_assert(ClientId >= 0 && ClientId < MAX_CLIENTS, "Invalid ClientId: %d", ClientId);
658 dbg_assert(m_aClients[ClientId].m_State != CServer::CClient::STATE_EMPTY, "Client slot %d is empty", ClientId);
659 return m_AuthManager.KeyLevel(m_aClients[ClientId].m_AuthKey);
660}
661
662bool CServer::IsRconAuthed(int ClientId) const
663{

Callers 6

ConTeleportMethod · 0.80
OnCallVoteNetMessageMethod · 0.80
OnSetAuthedMethod · 0.80
SnapMethod · 0.80
BanExtMethod · 0.80
ConStatusMethod · 0.80

Calls 1

KeyLevelMethod · 0.80

Tested by

no test coverage detected