diff --git a/rlgwebd.js b/rlgwebd.js index 90129df..09fb437 100755 --- a/rlgwebd.js +++ b/rlgwebd.js @@ -19,7 +19,6 @@ var chrootDir = "/var/dgl/"; var dropToUID = 501; var dropToGID = 501; var serveStaticRoot = "/var/www/"; // inside the chroot -var passwdfile = "/dgldir/dgl-login"; var playtimeout = 3600000; // Idle time before games are autosaved, in ms /* Global state */ @@ -258,46 +257,6 @@ function getCookies(req) { 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) { var jsonobj; if (!posttext) @@ -314,11 +273,6 @@ function getMsg(posttext) { return jsonobj; } -function auth(username, password) { - // Real authentication not implemented - return true; -} - function reaper() { var now = new Date(); function reapcheck(session) {