]> git.sesse.net Git - remoteglot/commitdiff
Show the engine ID in the footer.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Nov 2014 16:33:08 +0000 (17:33 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 9 Nov 2014 16:33:08 +0000 (17:33 +0100)
Engine.pm
www/index.html
www/js/remoteglot.js

index 59b1fe36e6617a992272df09c210a74cc2ede14d..4d05750e187546e301b27319766cb2a9e0ce6322 100644 (file)
--- 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 (!$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 {
                        $engine->{'seen_uciok'} = 1;
                }
        } else {
index cafa2e1055921524b2aa15f595bcce18db72f035..44a22fd950b5dbebacc502daf0f5ee49adc2463c 100644 (file)
@@ -48,7 +48,7 @@
 </ul>
 <p id="credits"><a href="http://git.sesse.net/?p=remoteglot;a=summary">remoteglot</a>
   &copy; 2007&ndash;2014 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>.
 </ul>
 <p id="credits"><a href="http://git.sesse.net/?p=remoteglot;a=summary">remoteglot</a>
   &copy; 2007&ndash;2014 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>.
-  Chess analysis by <a href="http://stockfishchess.org/">Stockfish</a> (main analysis: 20x2.27GHz Haswell-EP,
+  Chess analysis by <a href="http://stockfishchess.org/" id="engineid">Stockfish</a> (main analysis: 20x2.27GHz Haswell-EP,
   multi-PV search: 12x2.3GHz Sandy Bridge).
   Moves provided by <a href="http://live.fide.com/sochi/">FIDE</a>.
   Hosting and multi-PV analysis hardware by <a href="http://www.samfundet.no/">Studentersamfundet i Trondhjem</a>.
   multi-PV search: 12x2.3GHz Sandy Bridge).
   Moves provided by <a href="http://live.fide.com/sochi/">FIDE</a>.
   Hosting and multi-PV analysis hardware by <a href="http://www.samfundet.no/">Studentersamfundet i Trondhjem</a>.
index fe5d266a672f71ee1aaccad7f8a34e4f906dabac..5ce7426b4f142e7105acdec50cb00d857168010b 100644 (file)
@@ -518,6 +518,11 @@ var update_board = function(data, num_viewers) {
                $("#numviewers").text(num_viewers + " current 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']);
        // The score.
        if (data['score'] !== null) {
                $("#score").text(data['score']);