mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-19 04:43:28 +02:00
Set socket.mcbot to null on end and kick
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user