X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FSubmit.pm;h=aeffb08df4e56401ba96d349477534d121fdc9b0;hb=808ba4350c813a4ce5c9340115fb714ed23e2ec5;hp=0159a9d06865f7a3f1132324e171bf310a4c748a;hpb=95a9ad1be9a7e32f642d469acb006990c2b86151;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index 0159a9d..aeffb08 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -33,6 +33,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 > lastjob ($r->user) + 30; + set_lastjob $r->user; local $Gruntmaster::Data::contest = $contest if $contest;