Mercurial > hg > rlgwebd
diff rlgterm.js @ 91:e07f98799120
RLG-Web: improve game-starting messages.
Include the name of the player and game when watching or playing.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Tue, 10 Jul 2012 16:32:49 -0700 |
parents | 6c6a6e4f1e5b |
children | a4d3ecf188b7 |
line wrap: on
line diff
--- a/rlgterm.js Tue Jul 10 13:53:38 2012 -0700 +++ b/rlgterm.js Tue Jul 10 16:32:49 2012 -0700 @@ -625,7 +625,7 @@ termemu.resize(reply.h, reply.w); setTitle("Playing as " + session.lname); debug(1, "Playing with id " + session.id); - message("Your game has started."); + message("You are now playing " + game.name + "."); setmode("play"); getData(); } @@ -661,7 +661,9 @@ termemu.toAltBuf(); setTitle("Watching"); debug(1, "Watching with id " + session.id); - message("You are now watching."); + var pname = reply.p; + var gname = games[reply.g].name; + message("You are now watching " + pname + " play " + gname + "."); setmode("watch"); getData(); }