mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-18 20:33:28 +02:00
15 lines
559 B
JavaScript
15 lines
559 B
JavaScript
module.exports = function(socket) {
|
|
|
|
// login event
|
|
socket.mcbot.on('login', function() {
|
|
socket.emit('buffer:success', 'Successfully logged in as ' + socket.mcbot.username + ' with entity id ' + socket.mcbot.entity.id);
|
|
socket.emit('bot:connect', {
|
|
host: socket.connectionParams.hostname,
|
|
port: socket.connectionParams.port,
|
|
username: socket.mcbot.username
|
|
});
|
|
console.log('logged in > ' + socket.connectionParams.hostname + ':' + socket.connectionParams.port + ' - ' + ' Username: ' + socket.mcbot.username);
|
|
});
|
|
|
|
};
|