mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-18 20:33:28 +02:00
Disallow multiple connections
This commit is contained in:
@@ -5,7 +5,8 @@ module.exports = function(socket) {
|
||||
socket.on('server:connect', function(data, response) {
|
||||
|
||||
if (socket.mcbot) {
|
||||
socket.mcbot.end();
|
||||
socket.emit('buffer:error', 'Pleae disconnect before connecting again');
|
||||
return;
|
||||
}
|
||||
|
||||
// create mineflayer bot
|
||||
|
||||
Reference in New Issue
Block a user