Implemented guest BLOCK and ALLOW options #25

This commit is contained in:
Simon
2018-11-27 10:25:21 -05:00
parent 950f6b6b4b
commit 1435d31d36
7 changed files with 117 additions and 58 deletions

View File

@@ -9,6 +9,8 @@ keyStore_password=
#Server
mar_address=ws://localhost:4567/socket
server_name=MAR dev
# ALLOW | TEMPORARY | BLOCK
guest_policy=ALLOW
#Database
mongo_dbname=mar_beta

View File

@@ -555,8 +555,9 @@ var AuthListener = (function () {
console.log("[MAR] Auth successful");
}
mar.client.requestUserInfo();
}
else {
} else if (message.m == "forbidden") {
alert("Authentication failed. Guest accounts are blocked on this server");
} else {
alert("Authentication failed. Please make sure you are logged in and reload the page.");
}
};
@@ -712,7 +713,9 @@ var GameClient = (function () {
if (DEBUG) {
console.log("[MAR] Received server info " + xhr.responseText);
}
setTimeout(self.connectToGameServer(JSON.parse(xhr.responseText)), 100);
setTimeout(function () {
return self.connectToGameServer(JSON.parse(xhr.responseText));
}, 100);
}
};
xhr.send(null);