MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / DoBasicAdminChecks

Method DoBasicAdminChecks

core/PlayerManager.cpp:2545–2583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2543}
2544
2545void CPlayer::DoBasicAdminChecks()
2546{
2547 if (GetAdminId() != INVALID_ADMIN_ID)
2548 {
2549 return;
2550 }
2551
2552 /* First check the name */
2553 AdminId id;
2554 int client = IndexOfEdict(m_pEdict);
2555
2556 if ((id = adminsys->FindAdminByIdentity("name", GetName())) != INVALID_ADMIN_ID)
2557 {
2558 if (!g_Players.CheckSetAdminName(client, this, id))
2559 {
2560 int userid = engine->GetPlayerUserId(m_pEdict);
2561 g_Timers.CreateTimer(&s_KickPlayerTimer, 0.1f, (void *)(intptr_t)userid, 0);
2562 }
2563 return;
2564 }
2565
2566 /* Check IP */
2567 if ((id = adminsys->FindAdminByIdentity("ip", m_IpNoPort.c_str())) != INVALID_ADMIN_ID)
2568 {
2569 if (g_Players.CheckSetAdmin(client, this, id))
2570 {
2571 return;
2572 }
2573 }
2574
2575 /* Check steam id */
2576 if ((id = adminsys->FindAdminByIdentity("steam", m_AuthID.c_str())) != INVALID_ADMIN_ID)
2577 {
2578 if (g_Players.CheckSetAdmin(client, this, id))
2579 {
2580 return;
2581 }
2582 }
2583}
2584
2585unsigned int CPlayer::GetLanguageId()
2586{

Callers 3

RecheckAnyAdminsMethod · 0.80
RunAdminCacheChecksFunction · 0.80

Calls 6

IndexOfEdictFunction · 0.85
FindAdminByIdentityMethod · 0.80
CheckSetAdminNameMethod · 0.80
CreateTimerMethod · 0.80
CheckSetAdminMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected