mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-18 20:33:28 +02:00
Working connect/disconnect handlers and status indicator
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user