mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
Merge ef7c201cc8 into c4d5235217
This commit is contained in:
commit
4ed8f7279a
@ -1560,10 +1560,23 @@ int PlayerManager::InternalFilterCommandTarget(CPlayer *pAdmin, CPlayer *pTarget
|
||||
|
||||
if (pAdmin != NULL)
|
||||
{
|
||||
if ((flags & COMMAND_FILTER_NO_IMMUNITY) != COMMAND_FILTER_NO_IMMUNITY
|
||||
&& !adminsys->CanAdminTarget(pAdmin->GetAdminId(), pTarget->GetAdminId()))
|
||||
if ((flags & COMMAND_FILTER_NO_IMMUNITY) != COMMAND_FILTER_NO_IMMUNITY)
|
||||
{
|
||||
return COMMAND_TARGET_IMMUNE;
|
||||
AdminId tid = pTarget->GetAdminId();
|
||||
/* If the target is pre-auth they're targetable; bypassing immunity rules... */
|
||||
if (tid == INVALID_ADMIN_ID && !pTarget->IsAuthStringValidated())
|
||||
{
|
||||
tid = adminsys->FindAdminByIdentity("steam", pTarget->GetAuthString(false));
|
||||
if (tid == INVALID_ADMIN_ID)
|
||||
{
|
||||
tid = adminsys->FindAdminByIdentity("ip", pTarget->GetIPAddress());
|
||||
}
|
||||
}
|
||||
|
||||
if (!adminsys->CanAdminTarget(pAdmin->GetAdminId(), tid))
|
||||
{
|
||||
return COMMAND_TARGET_IMMUNE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user