CanAdminTarget Function

Tests whether one admin can target another.

The heuristics for this check are as follows: 0. If the targeting AdminId is INVALID_ADMIN_ID, targeting fails. 1. If the targeted AdminId is INVALID_ADMIN_ID, targeting succeeds. 2. If the targeted AdminId is the same as the targeting AdminId, (self) targeting succeeds. 3. If the targeting admin is root, targeting succeeds. 4. If the targeted admin has access higher (as interpreted by (sm_immunity_mode) than the targeting admin, then targeting fails. 5. If the targeted admin has specific immunity from the targeting admin via group immunities, targeting fails. 6. Targeting succeeds.

bool CanAdminTarget(AdminId admin, AdminId target)


AdminId admin

Admin doing the targetting (may be INVALID_ADMIN_ID).

AdminId target

Target admin (may be INVALID_ADMIN_ID).

Return Value

True if targetable, false if immune.