rlgterm.js: remove unnecessary debugging messages.
This commit is contained in:
parent
3dc15a18e7
commit
73bf867839
1 changed files with 0 additions and 10 deletions
10
rlgterm.js
10
rlgterm.js
|
|
@ -261,7 +261,6 @@ function postResponseHandler() {
|
|||
}
|
||||
|
||||
function errHandler() {
|
||||
//debug(1, "Server unavailable?");
|
||||
message("Unable to connect to the server.", "warn");
|
||||
}
|
||||
|
||||
|
|
@ -444,12 +443,10 @@ function formlogin(ev) {
|
|||
/* Success */
|
||||
session.lcred = reply.k;
|
||||
session.lname = reply.u;
|
||||
debug(0, "Logged in as " + reply.u + " with id " + reply.k);
|
||||
message("You are now logged in as " + reply.u + ".");
|
||||
setmode("choose");
|
||||
}
|
||||
else if (reply.t == 'E') {
|
||||
debug(0, "Could not log in: " + reply.s);
|
||||
var failmsg = "Logging in failed. ";
|
||||
if (reply.c == 2)
|
||||
failmsg += reply.s.match(/Invalid data: (.*)/)[1];
|
||||
|
|
@ -628,13 +625,11 @@ function startgame(game) {
|
|||
session.id = reply.id;
|
||||
session.playing = true;
|
||||
termemu.resize(reply.h, reply.w);
|
||||
debug(1, "Playing with id " + session.id);
|
||||
message("You are now playing " + game.name + ".");
|
||||
setmode("play");
|
||||
getData();
|
||||
}
|
||||
else if (reply.t == 'E') {
|
||||
debug(1, "Could not start game: " + reply.s);
|
||||
if (reply.c == 1) {
|
||||
logout();
|
||||
message("The server forgot about you, please log in again.", "warn");
|
||||
|
|
@ -674,7 +669,6 @@ function startwatching(gamenumber) {
|
|||
termemu.resize(reply.h, reply.w);
|
||||
termemu.reset();
|
||||
termemu.toAltBuf();
|
||||
debug(1, "Watching with id " + session.id);
|
||||
var pname = reply.p;
|
||||
var gname = games[reply.g].name;
|
||||
message("You are now watching " + pname + " play " + gname + ".");
|
||||
|
|
@ -682,7 +676,6 @@ function startwatching(gamenumber) {
|
|||
getData();
|
||||
}
|
||||
else if (reply.t == 'E') {
|
||||
debug(1, "Could not watch game " + gamenumber + ": " + reply.s);
|
||||
message("The game could not be watched: " + reply.s, "warn");
|
||||
getcurrent();
|
||||
}
|
||||
|
|
@ -715,16 +708,13 @@ function formreg(ev) {
|
|||
var reply = JSON.parse(req.responseText);
|
||||
if (reply.t == 'r') {
|
||||
/* Success */
|
||||
debug(1, "Registered account: " + reply.u);
|
||||
message("Welcome " + reply.u + ", you are now registered.");
|
||||
session.lcred = reply.k;
|
||||
session.lname = reply.u;
|
||||
debug(1, "Logged in as " + session.lname + " with id " + session.lcred);
|
||||
message("You are now logged in as " + reply.u + ".");
|
||||
setmode("choose");
|
||||
}
|
||||
else if (reply.t == 'E') {
|
||||
debug(1, "Could not register: " + reply.s);
|
||||
var failmsg = "Registration failed.";
|
||||
if (reply.c == 2) {
|
||||
var errdesc = reply.s.match(/Invalid data: (.*)/)[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue