From 9980930dff648e3682df894d3ed37e723844376f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 9 Nov 2014 16:30:41 -0800 Subject: [PATCH] Port antiflood. --- plugins/antiflood.sp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/antiflood.sp b/plugins/antiflood.sp index 02a93c1b..21fce854 100644 --- a/plugins/antiflood.sp +++ b/plugins/antiflood.sp @@ -47,7 +47,7 @@ public Plugin:myinfo = new Float:g_LastTime[MAXPLAYERS + 1] = {0.0, ...}; /* Last time player used say or say_team */ new g_FloodTokens[MAXPLAYERS + 1] = {0, ...}; /* Number of flood tokens player has */ -new Handle:sm_flood_time; /* Handle to sm_flood_time convar */ +ConVar sm_flood_time; /* Handle to sm_flood_time convar */ public OnPluginStart() { @@ -60,11 +60,11 @@ public OnClientPutInServer(client) g_FloodTokens[client] = 0; } -new Float:max_chat; +float max_chat; -public bool:OnClientFloodCheck(client) +public bool OnClientFloodCheck(int client) { - max_chat = GetConVarFloat(sm_flood_time); + max_chat = sm_flood_time.FloatValue; if (max_chat <= 0.0 || CheckCommandAccess(client, "sm_flood_access", ADMFLAG_ROOT, true))