mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-13 23:24:34 +00:00
More time checks
This commit is contained in:
parent
7ad8457783
commit
827d09e7a9
1 changed files with 13 additions and 2 deletions
|
|
@ -325,9 +325,20 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(%arg1 < $Host::TimeLimit)
|
//If proposed time is lower than server set or higher than unlimited
|
||||||
|
if(%arg1 < $Host::TimeLimit || %arg1 > 999)
|
||||||
|
{
|
||||||
|
messageClient(%client, "", "\c2Invalid time selection.");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//If proposed time is something other than what is selectable
|
||||||
|
if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999")
|
||||||
|
{
|
||||||
|
messageClient(%client, "", "\c2Only selectable times allowed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote))
|
if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote))
|
||||||
{
|
{
|
||||||
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
|
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue