how did i forget to commit this? sm_revote
authorDavid Anderson <dvander@alliedmods.net>
Sat May 24 03:04:10 2008 +0000 (2008-05-24)
changeset 2068ec32dd185d80
parent 2067 9a2e8647ca39
child 2069 80d56f1d58fe
how did i forget to commit this? sm_revote
plugins/basecommands.sp
     1.1 --- a/plugins/basecommands.sp	Wed May 21 23:45:18 2008 +0000
     1.2 +++ b/plugins/basecommands.sp	Sat May 24 03:04:10 2008 +0000
     1.3 @@ -71,6 +71,7 @@
     1.4  	RegAdminCmd("sm_who", Command_Who, ADMFLAG_GENERIC, "sm_who [#userid|name]");
     1.5  	RegAdminCmd("sm_reloadadmins", Command_ReloadAdmins, ADMFLAG_BAN, "sm_reloadadmins");
     1.6  	RegAdminCmd("sm_cancelvote", Command_CancelVote, ADMFLAG_VOTE, "sm_cancelvote");
     1.7 +	RegConsoleCmd("sm_revote", Command_ReVote);
     1.8  	
     1.9  	/* Account for late loading */
    1.10  	new Handle:topmenu;
    1.11 @@ -368,3 +369,31 @@
    1.12  
    1.13  	return Plugin_Handled;
    1.14  }
    1.15 +
    1.16 +public Action:Command_ReVote(client, args)
    1.17 +{
    1.18 +	if (client == 0)
    1.19 +	{
    1.20 +		ReplyToCommand(client, "[SM] %t", "Command is in-game only");
    1.21 +		return Plugin_Handled;
    1.22 +	}
    1.23 +	
    1.24 +	if (!IsVoteInProgress())
    1.25 +	{
    1.26 +		ReplyToCommand(client, "[SM] %t", "Vote Not In Progress");
    1.27 +		return Plugin_Handled;
    1.28 +	}
    1.29 +	
    1.30 +	if (!IsClientInVotePool(client))
    1.31 +	{
    1.32 +		ReplyToCommand(client, "[SM] %t", "Cannot participate in vote");
    1.33 +		return Plugin_Handled;
    1.34 +	}
    1.35 +	
    1.36 +	if (!RedrawClientVoteMenu(client))
    1.37 +	{
    1.38 +		ReplyToCommand(client, "[SM] %t", "Cannot change vote");
    1.39 +	}
    1.40 +	
    1.41 +	return Plugin_Handled;
    1.42 +}