diff --git a/rlgterm.js b/rlgterm.js index 5364e61..f3cd783 100644 --- a/rlgterm.js +++ b/rlgterm.js @@ -417,6 +417,10 @@ function setup() { else break; } + if (!WebSocket) { + message("Your browser does not support WebSockets. You can still play, " + + "but it will be slower, and may not work in the future.", "warn"); + } return; } @@ -692,8 +696,14 @@ function startgame(game) { message("The server forgot about you, please log in again.", "warn"); } else if (reply.c == 4) { - message("You can't play that game because it is currently being " + - "played over SSH.", "warn"); + if (reply.s == "dgamelaunch") { + message("You are already playing " + game.name + " over SSH.", + "warn"); + } + else { + message("You are already playing " + game.name + + " in another browser window.", "warn"); + } } else if (reply.c == 7) { message("The game is being saved, try again in a few seconds."); diff --git a/rlgwebd.js b/rlgwebd.js index f798c7d..fee0c8e 100755 --- a/rlgwebd.js +++ b/rlgwebd.js @@ -756,7 +756,7 @@ function startgame(req, res, formdata) { var nodematch = new RegExp("^" + username + ":node:"); if (fname && (fname.match(nodematch) === null)) { /* It's being played in dgamelaunch. */ - sendError(res, 4, null); + sendError(res, 4, "dgamelaunch"); tslog("%s is already playing %s", username, gname); return; } @@ -786,7 +786,9 @@ function startgame(req, res, formdata) { return; } } - sendError(res, 7); + /* If there's no player, it's a WebSocket game, and shouldn't be + * seized. */ + sendError(res, 4, "WebSocket"); } else { new Player(gname, lkey, dims, respondlaunch);