1.1 --- a/plugins/include/menus.inc Tue Oct 16 19:06:11 2007 +0000
1.2 +++ b/plugins/include/menus.inc Tue Oct 16 19:28:02 2007 +0000
1.3 @@ -731,3 +731,21 @@
1.4 winningVotes = param2 & 0xFFFF;
1.5 totalVotes = param2 >> 16;
1.6 }
1.7 +
1.8 +/**
1.9 + * Quick stock to determine whether voting is allowed. This doesn't let you
1.10 + * fine-tune a reason for not voting, so it's not recommended for lazily
1.11 + * telling clients that voting isn't allowed.
1.12 + *
1.13 + * @return True if voting is allowed, false if voting is in progress
1.14 + * or the cooldown is active.
1.15 + */
1.16 +stock bool:IsNewVoteAllowed()
1.17 +{
1.18 + if (IsVoteInProgress() || CheckVoteDelay() != 0)
1.19 + {
1.20 + return false;
1.21 + }
1.22 +
1.23 + return true;
1.24 +}