mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-06-01 18:58:27 +02:00
Syntax stuff
This commit is contained in:
@@ -19,6 +19,6 @@ module.exports = function($scope, socket) {
|
|||||||
$scope.chat = '';
|
$scope.chat = '';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module.exports = function($scope, socket) {
|
|||||||
|
|
||||||
// connect handler
|
// connect handler
|
||||||
$scope.connect = function() {
|
$scope.connect = function() {
|
||||||
$('#connectModal').modal('hide')
|
$('#connectModal').modal('hide');
|
||||||
|
|
||||||
if (socket.connected) {
|
if (socket.connected) {
|
||||||
|
|
||||||
@@ -22,6 +22,6 @@ module.exports = function($scope, socket) {
|
|||||||
} else {
|
} else {
|
||||||
alert('Server unreachable, please try again later...');
|
alert('Server unreachable, please try again later...');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = function($scope, socket) {
|
|||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
$scope.connected = false;
|
$scope.connected = false;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
socket.on('disconnect', function() {
|
socket.on('disconnect', function() {
|
||||||
$scope.$apply(function() {
|
$scope.$apply(function() {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ module.exports = function(socket) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$('#buffer').append('<span style="color:#D62D18;">[i] Error: ' + error + '</span><br>')
|
$('#buffer').append('<span style="color:#D62D18;">[i] Error: ' + error + '</span><br>');
|
||||||
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -38,17 +38,17 @@ module.exports = function(socket) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
socket.on('reconnect', function() {
|
socket.on('reconnect', function() {
|
||||||
$('#buffer').append('<span style="color:#4AA937;">> Connected to chat server established</span><br>')
|
$('#buffer').append('<span style="color:#4AA937;">> Connected to chat server established</span><br>');
|
||||||
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('disconnect', function() {
|
socket.on('disconnect', function() {
|
||||||
$('#buffer').append('<span style="color:#D62D18;">> Connection to chat server has been lost. Reconnecting...</span><br>')
|
$('#buffer').append('<span style="color:#D62D18;">> Connection to chat server has been lost. Reconnecting...</span><br>');
|
||||||
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('bot:disconnect', function() {
|
socket.on('bot:disconnect', function() {
|
||||||
$('#buffer').append('<span style="color:#D62D18;">> You have been disconnected from the Minecraft server.</span><br>')
|
$('#buffer').append('<span style="color:#D62D18;">> You have been disconnected from the Minecraft server.</span><br>');
|
||||||
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -58,5 +58,5 @@ module.exports = function(socket) {
|
|||||||
$('#buffer').append(string + '<br>\n');
|
$('#buffer').append(string + '<br>\n');
|
||||||
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user