]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Submit.pm
Use new lastjob
[gruntmaster-page.git] / lib / Gruntmaster / Page / Submit.pm
index e537765165bb64fe05646d9df0bb26a3df098a3e..535a5363f8667621bb20a8167efedde0b431fb41 100644 (file)
@@ -24,6 +24,9 @@ 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 'Maximum source size is 10KB' if length $prog > 25 * 1024;
+       return reply 'You must wait 30 seconds between jobs' unless time > user_lastjob ($r->user) + 30;
+       set_user_lastjob $r->user, time;
 
        local $Gruntmaster::Data::contest = $contest if $contest;
 
This page took 0.020864 seconds and 4 git commands to generate.