added amb1341 - OnClientPostAdminFilter
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401837
This commit is contained in:
parent
9b6c6c1fcd
commit
89ac3a14ba
@ -51,6 +51,7 @@ PlayerManager g_Players;
|
||||
bool g_OnMapStarted = false;
|
||||
IForward *PreAdminCheck = NULL;
|
||||
IForward *PostAdminCheck = NULL;
|
||||
IForward *PostAdminFilter = NULL;
|
||||
const unsigned int *g_NumPlayersToAuth = NULL;
|
||||
int lifestate_offset = -1;
|
||||
List<ICommandTargetProcessor *> target_processors;
|
||||
@ -130,6 +131,7 @@ void PlayerManager::OnSourceModAllInitialized()
|
||||
|
||||
PreAdminCheck = g_Forwards.CreateForward("OnClientPreAdminCheck", ET_Event, 1, p1);
|
||||
PostAdminCheck = g_Forwards.CreateForward("OnClientPostAdminCheck", ET_Ignore, 1, p1);
|
||||
PostAdminFilter = g_Forwards.CreateForward("OnClientPostAdminFilter", ET_Ignore, 1, p1);
|
||||
}
|
||||
|
||||
void PlayerManager::OnSourceModShutdown()
|
||||
@ -155,6 +157,7 @@ void PlayerManager::OnSourceModShutdown()
|
||||
|
||||
g_Forwards.ReleaseForward(PreAdminCheck);
|
||||
g_Forwards.ReleaseForward(PostAdminCheck);
|
||||
g_Forwards.ReleaseForward(PostAdminFilter);
|
||||
|
||||
delete [] m_Players;
|
||||
}
|
||||
@ -1374,6 +1377,9 @@ void CPlayer::NotifyPostAdminChecks()
|
||||
pListener->OnClientPostAdminCheck(m_iIndex);
|
||||
}
|
||||
|
||||
PostAdminFilter->PushCell(m_iIndex);
|
||||
PostAdminFilter->Execute(NULL);
|
||||
|
||||
PostAdminCheck->PushCell(m_iIndex);
|
||||
PostAdminCheck->Execute(NULL);
|
||||
}
|
||||
|
@ -136,6 +136,23 @@ forward OnClientAuthorized(client, const String:auth[]);
|
||||
*/
|
||||
forward Action:OnClientPreAdminCheck(client);
|
||||
|
||||
/**
|
||||
* Called directly before OnClientPostAdminCheck() as a method to
|
||||
* alter administrative permissions before plugins perform final
|
||||
* post-connect operations.
|
||||
*
|
||||
* In general, do not use this function unless you are specifically
|
||||
* attempting to change access permissions. Use OnClientPostAdminCheck()
|
||||
* instead if you simply want to perform post-connect authorization
|
||||
* routines.
|
||||
*
|
||||
* See OnClientPostAdminCheck() for more information.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @noreturn
|
||||
*/
|
||||
forward OnClientPostAdminFilter(client);
|
||||
|
||||
/**
|
||||
* Called once a client is authorized and fully in-game, and
|
||||
* after all post-connection authorizations have been performed.
|
||||
|
Loading…
Reference in New Issue
Block a user