X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FSubmit.pm;h=535a5363f8667621bb20a8167efedde0b431fb41;hb=e046c73abf1f466bcafca06a01a0af2c9e2120c9;hp=569fe9186f38c2cadff58d62af93767f43a4ce61;hpb=6a9aaf149c09cd2e8ae1332e4f50abbb946870c2;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index 569fe91..535a536 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -24,8 +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 'You must wait 30 seconds between jobs' unless time > lastjob ($r->user) + 30; - set_lastjob $r->user; + 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;