projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7bbeee
)
Require a delay of 30 seconds between jobs from a single user
author
Marius Gavrilescu
<marius@ieval.ro>
Wed, 26 Feb 2014 08:18:37 +0000
(10:18 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Wed, 26 Feb 2014 08:26:25 +0000
(10:26 +0200)
lib/Gruntmaster/Page/Submit.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/Submit.pm
b/lib/Gruntmaster/Page/Submit.pm
index e537765165bb64fe05646d9df0bb26a3df098a3e..569fe9186f38c2cadff58d62af93767f43a4ce61 100644
(file)
--- a/
lib/Gruntmaster/Page/Submit.pm
+++ b/
lib/Gruntmaster/Page/Submit.pm
@@
-24,6
+24,8
@@
sub generate{
die if defined $contest && $contest !~ /^\w+$/ ;
die if defined $contest && (time > contest_end $contest);
return reply 'A required parameter was not supplied' if grep { !defined } $problem, $format, $prog;
+ return reply 'You must wait 30 seconds between jobs' unless time > lastjob ($r->user) + 30;
+ set_lastjob $r->user;
local $Gruntmaster::Data::contest = $contest if $contest;
This page took
0.010003 seconds
and
4
git commands to generate.