diff rlgterm.js @ 97:8a748eac7c11

rlgterm.js: remove unnecessary debugging messages.
author John "Elwin" Edwards <elwin@sdf.org>
date Wed, 11 Jul 2012 15:45:22 -0700
parents 7bb634f6995c
children 3dbfdaf62623
line wrap: on
line diff
--- a/rlgterm.js	Wed Jul 11 11:10:50 2012 -0700
+++ b/rlgterm.js	Wed Jul 11 15:45:22 2012 -0700
@@ -261,7 +261,6 @@
 }
 
 function errHandler() {
-  //debug(1, "Server unavailable?");
   message("Unable to connect to the server.", "warn");
 }
 
@@ -444,12 +443,10 @@
       /* 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 @@
       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 @@
       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 @@
       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 @@
     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];