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.
This commit is contained in:
parent
9c45f52722
commit
06614ac0aa
2 changed files with 6 additions and 1 deletions
|
|
@ -562,6 +562,8 @@ function getchoices() {
|
||||||
acttext = "Start a game";
|
acttext = "Start a game";
|
||||||
else if (reply.stat[gname] == "p")
|
else if (reply.stat[gname] == "p")
|
||||||
acttext = "Game in progress";
|
acttext = "Game in progress";
|
||||||
|
else if (reply.stat[gname] == "d")
|
||||||
|
acttext = "Game in progress (dgl)";
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
var button = document.createElement("span");
|
var button = document.createElement("span");
|
||||||
|
|
|
||||||
|
|
@ -389,7 +389,10 @@ function playerstatus(user, callback) {
|
||||||
}
|
}
|
||||||
function regactive(err, filename, game) {
|
function regactive(err, filename, game) {
|
||||||
if (!err && filename) {
|
if (!err && filename) {
|
||||||
sdata[game.uname] = "p";
|
if (filename.match(/^[^:]*:node:/))
|
||||||
|
sdata[game.uname] = "p";
|
||||||
|
else
|
||||||
|
sdata[game.uname] = "d";
|
||||||
finishp();
|
finishp();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue