diff --git a/index.js b/index.js index 53fc411..270735b 100644 --- a/index.js +++ b/index.js @@ -92,11 +92,9 @@ client.on('message', async msg => { } catch (e) { console.log(e); } - //console.log(query); let serverStatus = "Stopped"; let serverTPS = "---"; if ( server.rconPort != 0 ) { - //console.log("Making new rcon connection..."); const rcon = new Rcon({ host: server.rconAddress, port: server.rconPort, @@ -105,7 +103,6 @@ client.on('message', async msg => { }); const connection = rcon.connect({ onSuccess: function() { - //console.log("Connected! " + serverStatus); serverStatus = "Running"; }, onError: function() { @@ -115,7 +112,7 @@ client.on('message', async msg => { }); connection.auth({ onSuccess: function () { - //console.log("Successfully authenticated to: " + server.name); + // Don't need to do anything on successful auth to rcon }, onError: function (error) { console.log("Could not authenticate to rcon server: " + server.name + " " + server.rconAddress + " " + server.rconPort); @@ -124,7 +121,6 @@ client.on('message', async msg => { }); await connection.send(server.rconTPSCommand, { onSuccess: function (response) { - //console.log(response); if ( ['1.2.5', '1.4.7'].includes(server.mcVersion) ) { let tpsParts = response.trim().split("\n"); serverTPS = tpsParts[0].split(" ").pop().slice(2); @@ -133,7 +129,6 @@ client.on('message', async msg => { serverTPS = tpsParts.pop(); if ( serverTPS.includes("*") ) serverTPS = serverTPS.split("*").pop(); } - //console.log("Got it all!_" + hostStatus + "_" + serverStatus + "_" + serverTPS + "_"); const q = new Query({host: server.rconAddress, port: server.queryPort, timeout: 250}); try { q.fullStat()