From 95bd22317a24c2d94289a16afb68100218a2bd31 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 9 Nov 2014 17:33:08 +0100 Subject: [PATCH] Show the engine ID in the footer. --- Engine.pm | 4 +++- www/index.html | 2 +- www/js/remoteglot.js | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Engine.pm b/Engine.pm index 59b1fe3..4d05750 100644 --- a/Engine.pm +++ b/Engine.pm @@ -46,7 +46,9 @@ sub _anyevent_handle_line { if (!$engine->{'seen_uciok'}) { # Gobble up lines until we see uciok. - if ($line =~ /^uciok$/) { + if ($line =~ /^id (\S+) (.*)$/) { + $engine->{'id'}->{$1} = $2; + } elsif ($line =~ /^uciok$/) { $engine->{'seen_uciok'} = 1; } } else { diff --git a/www/index.html b/www/index.html index cafa2e1..44a22fd 100644 --- a/www/index.html +++ b/www/index.html @@ -48,7 +48,7 @@

remoteglot © 2007–2014 Steinar H. Gunderson. - Chess analysis by Stockfish (main analysis: 20x2.27GHz Haswell-EP, + Chess analysis by Stockfish (main analysis: 20x2.27GHz Haswell-EP, multi-PV search: 12x2.3GHz Sandy Bridge). Moves provided by FIDE. Hosting and multi-PV analysis hardware by Studentersamfundet i Trondhjem. diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index fe5d266..5ce7426 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -518,6 +518,11 @@ var update_board = function(data, num_viewers) { $("#numviewers").text(num_viewers + " current viewers"); } + // The engine id. + if (data['id'] && data['id']['name'] !== null) { + $("#engineid").text(data['id']['name']); + } + // The score. if (data['score'] !== null) { $("#score").text(data['score']); -- 2.39.2