From 4e88a5a431e6f61b089d26c8f4cca19a46337f00 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Sun, 19 Oct 2008 16:18:22 +1300 Subject: [PATCH] Updated rockthevote to use new OnClientConnected forward (bug 3311) --- plugins/rockthevote.sp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/rockthevote.sp b/plugins/rockthevote.sp index dcb03c61..8de3fbba 100644 --- a/plugins/rockthevote.sp +++ b/plugins/rockthevote.sp @@ -112,22 +112,22 @@ public OnConfigsExecuted() CreateTimer(GetConVarFloat(g_Cvar_InitialDelay), Timer_DelayRTV, _, TIMER_FLAG_NO_MAPCHANGE); } -public bool:OnClientConnect(client, String:rejectmsg[], maxlen) +public OnClientConnected(client) { if(IsFakeClient(client)) - return true; + return; g_Voted[client] = false; g_Voters++; g_VotesNeeded = RoundToFloor(float(g_Voters) * GetConVarFloat(g_Cvar_Needed)); - return true; + return; } public OnClientDisconnect(client) { - if(!g_CanRTV || IsFakeClient(client)) + if(IsFakeClient(client)) return; if(g_Voted[client]) @@ -139,6 +139,11 @@ public OnClientDisconnect(client) g_VotesNeeded = RoundToFloor(float(g_Voters) * GetConVarFloat(g_Cvar_Needed)); + if (!g_CanRTV) + { + return; + } + if (g_Votes && g_Voters && g_Votes >= g_VotesNeeded &&