X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=9cbf820d5dcd336d5e0bff16d118da711462e84f;hp=9a1ee4ca415b941ba926cd7036f49175480bdbae;hb=619f444e5eafb0f602d848ec13d70148cd90a16b;hpb=a36f24feb5ed826146ac75c50f7489876190252c diff --git a/remoteglot.pl b/remoteglot.pl index 9a1ee4c..9cbf820 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -67,7 +67,7 @@ select(TBLOG); $| = 1; select(STDOUT); -umask 0027; # analysis.json should not be served to users. +umask 0022; # analysis.json should not be served to users. # open the chess engine my $engine = open_engine($remoteglotconf::engine_cmdline, 'E1', sub { handle_uci(@_, 1); }); @@ -124,7 +124,7 @@ if (defined($remoteglotconf::server)) { ); } if (defined($remoteglotconf::target)) { - if ($remoteglotconf::target =~ /^http:/) { + if ($remoteglotconf::target =~ /^https?:/) { fetch_pgn($remoteglotconf::target); } elsif (defined($t)) { $t->cmd("observe $remoteglotconf::target"); @@ -533,7 +533,7 @@ sub prettyprint_pv_no_cache { sub prettyprint_pv { my ($pos, @pvs) = @_; - my $cachekey = $pos->{'fen'} . join('', @pvs); + my $cachekey = $pos->fen() . join('', @pvs); if (exists($pos->{'prettyprint_cache'}{$cachekey})) { return @{$pos->{'prettyprint_cache'}{$cachekey}}; } else {