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

Method DoPostConnectAuthorization

core/PlayerManager.cpp:2459–2502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2457}
2458
2459void CPlayer::DoPostConnectAuthorization()
2460{
2461 bool delay = false;
2462
2463 List<IClientListener *>::iterator iter;
2464 for (iter = g_Players.m_hooks.begin();
2465 iter != g_Players.m_hooks.end();
2466 iter++)
2467 {
2468 IClientListener *pListener = (*iter);
2469#if defined MIN_API_FOR_ADMINCALLS
2470 if (pListener->GetClientListenerVersion() < MIN_API_FOR_ADMINCALLS)
2471 {
2472 continue;
2473 }
2474#endif
2475 if (!pListener->OnClientPreAdminCheck(m_iIndex))
2476 {
2477 delay = true;
2478 }
2479 }
2480
2481 cell_t result = 0;
2482 PreAdminCheck->PushCell(m_iIndex);
2483 PreAdminCheck->Execute(&result);
2484
2485 /* Defer, for better or worse */
2486 if (delay || (ResultType)result >= Pl_Handled)
2487 {
2488 return;
2489 }
2490
2491 /* Sanity check */
2492 if (!IsConnected())
2493 {
2494 return;
2495 }
2496
2497 /* Otherwise, go ahead and do admin checks */
2498 DoBasicAdminChecks();
2499
2500 /* Send the notification out */
2501 NotifyPostAdminChecks();
2502}
2503
2504bool CPlayer::RunAdminCacheChecks()
2505{

Callers 1

OnClientPutInServerMethod · 0.80

Calls 6

OnClientPreAdminCheckMethod · 0.80
PushCellMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected