- added AddTargetsToMenu2() for using COMMAND_FILTER flags
- fixed amb1350 - sm_voteban/menu ban on fake clients would crash - fake clients can no longer be banned and do not appear on ban menus --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401838
This commit is contained in:
@@ -256,6 +256,11 @@ static cell_t BanClient(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("Client index %d is invalid", client);
|
||||
}
|
||||
|
||||
if (pPlayer->IsFakeClient())
|
||||
{
|
||||
return pContext->ThrowNativeError("Cannot ban fake client %d", client);
|
||||
}
|
||||
|
||||
pContext->LocalToString(params[4], &ban_reason);
|
||||
pContext->LocalToString(params[5], (char **)&kick_message);
|
||||
pContext->LocalToString(params[6], &ban_cmd);
|
||||
|
||||
Reference in New Issue
Block a user