mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-18 20:33:28 +02:00
Modularized code
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Buffer Controller
|
||||
*/
|
||||
|
||||
module.exports = function($scope, socket, buffer) {
|
||||
|
||||
// initial console buffer
|
||||
buffer.append('<br>');
|
||||
buffer.append('Welcome to AlexKvazos\'s Minecraft Chat App');
|
||||
buffer.append('> Press connect to connect to a Minecraft server and start chatting!');
|
||||
buffer.append('<br>');
|
||||
buffer.append('<i>Note: This application only works with 1.8 Minecraft servers.</i>');
|
||||
buffer.append('---');
|
||||
buffer.append('<br>');
|
||||
|
||||
// buffer errors when received
|
||||
socket.on('bot:error', function(error) {
|
||||
buffer.error(error);
|
||||
});
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user