Working connect/disconnect handlers and status indicator

This commit is contained in:
AlexKvazos
2015-04-28 11:19:36 -05:00
parent 542ae1f549
commit 793fe3e162
7 changed files with 55 additions and 10 deletions
+4
View File
@@ -16,9 +16,13 @@ module.exports = function(socket) {
password: data.password
});
// store connection params in socket
socket.connectionParams = data;
// prepare for errors
socket.mcbot.on('error', function(error) {
socket.emit('buffer:error', error);
socket.mcbot = null;
});
// bind bot events