| 2543 | } |
| 2544 | |
| 2545 | void 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 | |
| 2585 | unsigned int CPlayer::GetLanguageId() |
| 2586 | { |
no test coverage detected