X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=yarrg%2Fcommod-results-processor;h=d427f74b41d10a51bcc2ed8fee3ae525a78e2fc2;hp=8ede37166a7c1215731769ccab8993437259634d;hb=HEAD;hpb=8de9e86e749db455deea697684b67be7874c5efa diff --git a/yarrg/commod-results-processor b/yarrg/commod-results-processor index 8ede371..fe05fb8 100755 --- a/yarrg/commod-results-processor +++ b/yarrg/commod-results-processor @@ -24,6 +24,7 @@ # are used without permission. This program is not endorsed or # sponsored by Three Rings. +BEGIN { unshift @INC, qw(.) } use strict (qw(vars)); use HTTP::Request; @@ -550,19 +551,17 @@ sub main__uploadpctb () { my $islandid; while ($resptxt =~ - m/^islands\[\d+\]\[\d+\]\=new\s+option\(\"(.*)\"\,(\d+)\)\s*$/mig + m/^islands\[(\d+)\]\[\d+\]\=new\s+option\(\"(.*)\"\,(\d+)\)\s*$/mig ) { - next unless $1 eq $island; - $islandid= $2; + next unless $1 eq $oceanids[0]; + next unless $2 eq $island; + $islandid= $3; } defined $islandid or die; die "@filenames ?" if grep { $_ ne $filename } @filenames; die "@forcerls ?" if grep { $_ ne $forcerl } @forcerls; - my $setisland= { - }; - print STDERR "Setting ocean and island...\n"; my $siurl= ($url . "?action=setisland".