Fix login race condition which caused rank loss

This commit is contained in:
calzoneman 2013-08-30 18:42:00 -05:00
parent bd348132e6
commit f90965c105
4 changed files with 23 additions and 4 deletions

View file

@ -43,9 +43,11 @@ Callbacks = {
/* fired when socket connection completes */
connect: function() {
setTimeout(function () {
socket.emit("joinChannel", {
name: CHANNEL.name
});
}, 2000);
if(NAME && SESSION) {
socket.emit("login", {
name: NAME,

View file

@ -969,7 +969,7 @@ function handleModPermissions() {
function handlePermissionChange() {
if(CLIENT.rank >= 2) {
$("#channelsettingswrap3").show();
if($("#channelsettingswrap").html() == "") {
if($("#channelsettingswrap").html().trim() == "") {
$("#channelsettingswrap").load("channeloptions.html", handleModPermissions);
}
else {