Function: CanUseBotFeature(player, action, source)
Description: Evaluates and audits bot access policy without executing the action. A source selects policy context; it does not supply a recruiter NPC or bypass restrictions.
Parameters:
player: connected player spawn. Case-insensitive action: inspect/list/help, recruit/create, activate/spawn, manage/control, camp, delete, or restore. Optional source: npc/lua/lua_npc, ui/guided, restore/system, or gm; other or omitted strings select direct-command context.
Returns: Allowed boolean and reason string. Invalid/disconnected player and unknown action return false with a reason.
Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.
Original Player ownership: Policy evaluation and audit use the original Player supplied to Lua. If a callback changes the connection to another Player, this call keeps evaluating and recording the original Player rather than reading the replacement Player’s permissions.