rlgwebd.js: remove dead code.
Remove functions that dealt with HTML forms and other obsolete code.
This commit is contained in:
parent
07c7ea3515
commit
fbc86e7e12
1 changed files with 0 additions and 46 deletions
46
rlgwebd.js
46
rlgwebd.js
|
|
@ -19,7 +19,6 @@ var chrootDir = "/var/dgl/";
|
||||||
var dropToUID = 501;
|
var dropToUID = 501;
|
||||||
var dropToGID = 501;
|
var dropToGID = 501;
|
||||||
var serveStaticRoot = "/var/www/"; // inside the chroot
|
var serveStaticRoot = "/var/www/"; // inside the chroot
|
||||||
var passwdfile = "/dgldir/dgl-login";
|
|
||||||
var playtimeout = 3600000; // Idle time before games are autosaved, in ms
|
var playtimeout = 3600000; // Idle time before games are autosaved, in ms
|
||||||
|
|
||||||
/* Global state */
|
/* Global state */
|
||||||
|
|
@ -258,46 +257,6 @@ function getCookies(req) {
|
||||||
return cookies;
|
return cookies;
|
||||||
}
|
}
|
||||||
|
|
||||||
function urlDec(encstr) {
|
|
||||||
var decstr = "";
|
|
||||||
var tnum;
|
|
||||||
for (var i = 0; i < encstr.length; i++)
|
|
||||||
{
|
|
||||||
if (encstr.charAt(i) == "+")
|
|
||||||
decstr += " ";
|
|
||||||
else if (encstr.charAt(i) == "%")
|
|
||||||
{
|
|
||||||
tnum = Number("0x" + encstr.slice(i + 1, 2));
|
|
||||||
if (!isNaN(tnum) && tnum >= 0)
|
|
||||||
decstr += String.fromCharCode(tnum);
|
|
||||||
i += 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
decstr += encstr.charAt(i);
|
|
||||||
}
|
|
||||||
return decstr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns the contents of a form */
|
|
||||||
function getFormValues(formtext) {
|
|
||||||
var pairstrs = formtext.split("&");
|
|
||||||
var data = {};
|
|
||||||
for (var i = 0; i < pairstrs.length; i++)
|
|
||||||
{
|
|
||||||
var eqsign = pairstrs[i].indexOf("=");
|
|
||||||
if (eqsign > 0) {
|
|
||||||
rawname = pairstrs[i].slice(0, eqsign);
|
|
||||||
rawval = pairstrs[i].slice(eqsign + 1);
|
|
||||||
name = urlDec(rawname);
|
|
||||||
val = urlDec(rawval);
|
|
||||||
if (!(name in data))
|
|
||||||
data[name] = [];
|
|
||||||
data[name].push(val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getMsg(posttext) {
|
function getMsg(posttext) {
|
||||||
var jsonobj;
|
var jsonobj;
|
||||||
if (!posttext)
|
if (!posttext)
|
||||||
|
|
@ -314,11 +273,6 @@ function getMsg(posttext) {
|
||||||
return jsonobj;
|
return jsonobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
function auth(username, password) {
|
|
||||||
// Real authentication not implemented
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function reaper() {
|
function reaper() {
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
function reapcheck(session) {
|
function reapcheck(session) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue