Working error handler

This commit is contained in:
AlexKvazos
2015-04-28 11:39:31 -05:00
parent 793fe3e162
commit 7e62e5dd79
5 changed files with 21 additions and 2 deletions
@@ -1,9 +1,18 @@
module.exports = function(socket) {
socket.on('disconnect', function() {
if (socket.mcbot) {
socket.mcbot.end();
}
});
socket.on('bot:disconnect', function() {
if (socket.mcbot) {
socket.mcbot.end();
}
});
};