1.1 --- a/plugins/rockthevote.sp Thu Nov 22 20:34:38 2007 +0000
1.2 +++ b/plugins/rockthevote.sp Fri Nov 23 01:06:35 2007 +0000
1.3 @@ -122,7 +122,7 @@
1.4
1.5 public bool:OnClientConnect(client, String:rejectmsg[], maxlen)
1.6 {
1.7 - if(IsFakeClient(client))
1.8 + if(!g_CanRTV || IsFakeClient(client))
1.9 return true;
1.10
1.11 g_Voted[client] = false;
1.12 @@ -136,7 +136,7 @@
1.13
1.14 public OnClientDisconnect(client)
1.15 {
1.16 - if(IsFakeClient(client))
1.17 + if(!g_CanRTV || IsFakeClient(client))
1.18 return;
1.19
1.20 if(g_Voted[client])
1.21 @@ -148,8 +148,9 @@
1.22
1.23 g_VotesNeeded = RoundToFloor(float(g_Voters) * GetConVarFloat(g_Cvar_Needed));
1.24
1.25 - if (g_Votes && g_Voters && g_Votes >= g_VotesNeeded && g_RTVAllowed)
1.26 - {
1.27 + if (g_Votes && g_Voters && g_Votes >= g_VotesNeeded && g_RTVAllowed && !g_RTVStarted)
1.28 + {
1.29 + g_RTVStarted = true;
1.30 CreateTimer(2.0, Timer_StartRTV, TIMER_FLAG_NO_MAPCHANGE);
1.31 }
1.32 }
1.33 @@ -160,6 +161,12 @@
1.34 {
1.35 ReplyToCommand(client, "[SM] Usage: sm_rtv_addmap <mapname>");
1.36 return Plugin_Handled;
1.37 + }
1.38 +
1.39 + if (!g_CanRTV)
1.40 + {
1.41 + ReplyToCommand(client, "[SM] RockTheVote is not available.");
1.42 + return Plugin_Handled;
1.43 }
1.44
1.45 decl String:mapname[64];
1.46 @@ -268,7 +275,8 @@
1.47 PrintToChatAll("[SM] %t", "RTV Requested", name, g_Votes, g_VotesNeeded);
1.48
1.49 if (g_Votes >= g_VotesNeeded)
1.50 - {
1.51 + {
1.52 + g_RTVStarted = true;
1.53 CreateTimer(2.0, Timer_StartRTV, TIMER_FLAG_NO_MAPCHANGE);
1.54 }
1.55 }
1.56 @@ -321,8 +329,6 @@
1.57 return;
1.58 }
1.59
1.60 - g_RTVStarted = true;
1.61 -
1.62 if (IsVoteInProgress())
1.63 {
1.64 // Can't start a vote, try again in 5 seconds.