Modularized code

This commit is contained in:
AlexKvazos
2015-04-28 09:01:06 -05:00
parent 397ae7d322
commit 9886a9408b
7 changed files with 101 additions and 75 deletions
@@ -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('&gt; 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);
});
};