Compare commits

..

No commits in common. "3c0d5b01b5c50e30825098075c4c293ef86a8e29" and "66187601bf471eccfb54ce7cb10768484d136ff2" have entirely different histories.

2 changed files with 2 additions and 5 deletions

View File

@ -4,10 +4,9 @@ const config = {
CHANNELS_ALLOW: ['123456789012345678', '123456789012345678'], CHANNELS_ALLOW: ['123456789012345678', '123456789012345678'],
MOD_ROLE: '123456789012345678', MOD_ROLE: '123456789012345678',
STAFF_ROLE: '123456789012345678', STAFF_ROLE: '123456789012345678',
RESTART_ROLE: '123456789012345678', RESTART_ROLE: '123456789012345678'
ALLOW_RESTART: false, ALLOW_RESTART: false,
PRESENCE_INTERVAL: 5, PRESENCE_INTERVAL: 5
ONLINE_CHECK: false
} }
module.exports = config; module.exports = config;

View File

@ -1,6 +1,5 @@
const ChildProcess = require('child_process'); const ChildProcess = require('child_process');
const { Client, GatewayIntentBits, Partials, EmbedBuilder } = require('discord.js'); const { Client, GatewayIntentBits, Partials, EmbedBuilder } = require('discord.js');
const Config = require('./config/config');
class Server { class Server {
@ -40,7 +39,6 @@ class Server {
hostIsAlive() { hostIsAlive() {
if ( !this.active || (this.rconAddress == "") ) return false; if ( !this.active || (this.rconAddress == "") ) return false;
if ( Config.ONLINE_CHECK == false ) return true;
try { try {
let res = ChildProcess.execSync('ping -c 1 -W 0.25 -q ' + this.rconAddress); let res = ChildProcess.execSync('ping -c 1 -W 0.25 -q ' + this.rconAddress);
return true; return true;