Clean up some comments
This commit is contained in:
parent
11c757b4f0
commit
c227097f37
7
index.js
7
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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user