Set socket.mcbot to null on end and kick

This commit is contained in:
AlexKvazos
2015-04-28 22:30:51 -05:00
parent 69b8f027d5
commit 4719dd52bb
+2 -1
View File
@@ -143,13 +143,14 @@ module.exports = function(socket) {
});
bot.on('end', function() {
socket.emit('buffer:error', 'Connection lost...');
socket.emit('bot:disconnect');
socket.mcbot = null;
});
bot.on('kick', function(reason) {
console.log(reason);
socket.emit('buffer:error', 'Kicked for: ' + reason);
socket.mcbot = null;
});
};