changeset 88:d644e7d46852

RLG-Web: make /pstatus/* differentiate between dgl and RLG-Web games. The /pstatus/ API now responds with "p" for games being played in RLG-Web and "d" for games being played in dgamelaunch.
author John "Elwin" Edwards <elwin@sdf.org>
date Mon, 09 Jul 2012 12:51:12 -0700
parents bd2cf6dda28d
children 6145e1ea7ace
files rlgterm.js rlgwebd.js
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rlgterm.js	Mon Jul 09 12:24:03 2012 -0700
+++ b/rlgterm.js	Mon Jul 09 12:51:12 2012 -0700
@@ -562,6 +562,8 @@
         acttext = "Start a game";
       else if (reply.stat[gname] == "p")
         acttext = "Game in progress";
+      else if (reply.stat[gname] == "d")
+        acttext = "Game in progress (dgl)";
       else
         continue;
       var button = document.createElement("span");
--- a/rlgwebd.js	Mon Jul 09 12:24:03 2012 -0700
+++ b/rlgwebd.js	Mon Jul 09 12:51:12 2012 -0700
@@ -389,7 +389,10 @@
   }
   function regactive(err, filename, game) {
     if (!err && filename) {
-      sdata[game.uname] = "p";
+      if (filename.match(/^[^:]*:node:/))
+        sdata[game.uname] = "p";
+      else
+        sdata[game.uname] = "d";
       finishp();
     }
     else