Updated readme screenshot

This commit is contained in:
AlexKvazos
2015-04-30 18:33:15 -05:00
parent 810eb6fca6
commit 423beaf29c
16 changed files with 31 additions and 33 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
module.exports = function(socket) {
module.exports = (socket) => {
socket.mcbot.on('end', function() {
socket.mcbot.on('end', () => {
socket.emit('bot:disconnect');
delete socket.mcbot;
});
+2 -2
View File
@@ -1,7 +1,7 @@
module.exports = function(socket) {
module.exports = (socket) => {
// login event
socket.mcbot.on('login', function() {
socket.mcbot.on('login', () => {
socket.emit('buffer:success', 'Successfully logged in as ' + socket.mcbot.username + ' with entity id ' + socket.mcbot.entity.id);
socket.emit('bot:connect', {
host: socket.connectionParams.hostname,
+3 -3
View File
@@ -4,10 +4,10 @@ var parseExtra = require('../../parsers/extra');
var escapeHtml = require('../../utils').escapeHtml;
module.exports = function(socket) {
module.exports = (socket) => {
// message event
socket.mcbot.on('message', function(message) {
socket.mcbot.on('message', (message) => {
// empty buffer
var buffer = '';
@@ -40,7 +40,7 @@ module.exports = function(socket) {
buffer = escapeHtml(buffer);
// format the buffer with the correct coloring
buffer = buffer.replace(/§([0-9abcdef])([^§]*)/ig, function replace(regex, color, msg) {
buffer = buffer.replace(/§([0-9abcdef])([^§]*)/ig, (regex, color, msg) => {
return '<span class="color-' + color + '">' + msg.replace(/ /g, '&nbsp;') + '</span>';
});
+2 -2
View File
@@ -1,7 +1,7 @@
module.exports = function(socket) {
module.exports = (socket) => {
// spawn event
socket.mcbot.on('spawn', function() {
socket.mcbot.on('spawn', () => {
var pos = socket.mcbot.entity.position;
socket.emit('buffer:info', 'Spawned at X:' + pos.x + ', Y:' + pos.y + ', Z:' + pos.z);
socket.emit('bot:players', socket.mcbot.players);
+1 -1
View File
@@ -4,7 +4,7 @@
var message = require('./events/message');
var end = require('./events/end');
module.exports = function(socket) {
module.exports = (socket) => {
login(socket);
spawn(socket);