mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-06-05 04:38:27 +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) {
|
socket.on('server:connect', function(data, response) {
|
||||||
|
|
||||||
if (socket.mcbot) {
|
if (socket.mcbot) {
|
||||||
socket.mcbot.end();
|
socket.emit('buffer:error', 'Pleae disconnect before connecting again');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create mineflayer bot
|
// create mineflayer bot
|
||||||
|
|||||||
Reference in New Issue
Block a user