AntiAFk plugin bypass
This commit is contained in:
12
src/main.js
12
src/main.js
@ -29,6 +29,7 @@ var doing;
|
||||
var calcInterval;
|
||||
var authInterval;
|
||||
var reconnectinterval;
|
||||
var antiAntiAFk;
|
||||
webserver.restartQueue = config.reconnect.notConnectedQueueEnd;
|
||||
if (config.webserver) {
|
||||
webserver.createServer(config.ports.web); // create the webserver
|
||||
@ -107,6 +108,7 @@ function join() {
|
||||
webserver.isInQueue = true;
|
||||
activity("Starting the queue...");
|
||||
let finishedQueue = false;
|
||||
antiAntiAfkmsg();
|
||||
client.on("packet", (data, meta) => { // each time 2b2t sends a packet
|
||||
switch (meta.name) {
|
||||
case "map_chunk":
|
||||
@ -208,6 +210,7 @@ function join() {
|
||||
|
||||
server.on('login', (newProxyClient) => { // handle login
|
||||
setTimeout(sendChunks, 50)
|
||||
if (config.antiAntiAFK) clearInterval(antiAntiAFk);
|
||||
newProxyClient.write('login', loginpacket);
|
||||
newProxyClient.write('position', {
|
||||
x: 0,
|
||||
@ -237,6 +240,9 @@ function join() {
|
||||
filterPacketAndSend(data, meta, client);
|
||||
//console.log("meta: " + JSON.stringify(meta) + "\ndata: " + JSON.stringify(data))
|
||||
});
|
||||
newProxyClient.on("end", () => {
|
||||
antiAntiAfkmsg();
|
||||
})
|
||||
|
||||
proxyClient = newProxyClient;
|
||||
});
|
||||
@ -453,6 +459,12 @@ function calcTime(msg) {
|
||||
|
||||
}
|
||||
|
||||
function antiAntiAfkmsg() {
|
||||
if (config.antiAntiAFK) antiAntiAFk = setInterval(function () {
|
||||
client.write("chat", { message: "{\"text\":\">\"}", position: 1 })
|
||||
}, 50000)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
startQueue: function () {
|
||||
startQueuing();
|
||||
|
||||
Reference in New Issue
Block a user