X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=Engine.pm;h=c46b4a8d313f3adfdcd9ac8a7e9301c0a5dd6f85;hp=59b1fe36e6617a992272df09c210a74cc2ede14d;hb=3a8a3682f658b1fd5f1ae8420230a356f57fc0ad;hpb=6da09de90c65452ce191c77e8bf1c1bf38def823 diff --git a/Engine.pm b/Engine.pm index 59b1fe3..c46b4a8 100644 --- a/Engine.pm +++ b/Engine.pm @@ -29,6 +29,8 @@ sub open { ev => $ev, cb => $cb, seen_uciok => 0, + stopping => 0, + chess960 => 0, }; print $uciwrite "uci\n"; @@ -46,7 +48,9 @@ sub _anyevent_handle_line { if (!$engine->{'seen_uciok'}) { # Gobble up lines until we see uciok. - if ($line =~ /^uciok$/) { + if ($line =~ /^id (\S+) (.*?)\s*$/) { + $engine->{'id'}->{$1} = $2; + } elsif ($line =~ /^uciok$/) { $engine->{'seen_uciok'} = 1; } } else {