- 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:
David Anderson
2008-01-04 16:05:26 +00:00
parent 89ac3a14ba
commit 4e07200cfb
6 changed files with 83 additions and 21 deletions
+5
View File
@@ -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);