comparison rlgterm.js @ 83:e04c8bf6d4da

rlgterm.js: fix debugging messages for registration.
author John "Elwin" Edwards <elwin@sdf.org>
date Sun, 08 Jul 2012 08:10:55 -0700
parents 06375a159188
children d644e7d46852
comparison
equal deleted inserted replaced
82:7480ef947d45 83:e04c8bf6d4da
688 if (req.readyState != 4 || req.status != 200) 688 if (req.readyState != 4 || req.status != 200)
689 return; 689 return;
690 var reply = JSON.parse(req.responseText); 690 var reply = JSON.parse(req.responseText);
691 if (reply.t == 'r') { 691 if (reply.t == 'r') {
692 /* Success */ 692 /* Success */
693 debug(1, "Registered account: " + reply.d); 693 debug(1, "Registered account: " + reply.u);
694 session.lcred = reply.k; 694 session.lcred = reply.k;
695 session.lname = reply.u; 695 session.lname = reply.u;
696 setTitle("Logged in as " + session.lname); 696 setTitle("Logged in as " + session.lname);
697 debug(1, "Logged in as " + session.lname + "with id " + session.lcred); 697 debug(1, "Logged in as " + session.lname + " with id " + session.lcred);
698 setmode("choose"); 698 setmode("choose");
699 } 699 }
700 else if (reply.t == 'E') { 700 else if (reply.t == 'E') {
701 debug(1, "Could not register: " + reply.s); 701 debug(1, "Could not register: " + reply.s);
702 document.getElementById("regin_name").value = ""; 702 document.getElementById("regin_name").value = "";