Commit 1d79c53b authored by Neoony's avatar Neoony
Browse files

-Added some extra logging to track strange status change

parent d9633242
......@@ -396,20 +396,24 @@ function RefreshSQL() {
// client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ activity: { name: 'with ' + playersinlobby + ' players @Lobby', url: 'https://empiresmod.com' }, status: 'available' }).catch(console.error);
// client.user.setPresence({ activity: { name: 'Booting up' }, status: 'dnd' }).catch(console.error);
console.log('playersinlobby > 1 && playersoutoflobby < 8 && LobbyUp == 1');
}
if (playersinlobby == 1 && playersoutoflobby < 8 && LobbyUp == 1) {
// client.user.setStatus('available');
// client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ activity: { name: 'with ' + playersinlobby + ' player @Lobby', url: 'https://empiresmod.com' }, status: 'available' }).catch(console.error);
console.log('playersinlobby == 1 && playersoutoflobby < 8 && LobbyUp == 1');
}
if (playersinlobby == 0 && HighestCurPopulation < 8 && LobbyUp == 1) {
client.user.setPresence({ activity: { name: 'Waiting for players', url: 'https://empiresmod.com' }, status: 'idle' }).catch(console.error);
// client.user.setStatus('idle');
console.log('playersinlobby == 0 && HighestCurPopulation < 8 && LobbyUp == 1');
}
if (HighestCurPopulation >= 8 && LobbyUp == 1) {
// client.user.setStatus('available');
// client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ activity: { name: 'Game On!' + ' @' + namex[HighestPopServer], url: 'https://empiresmod.com' }, status: 'available' }).catch(console.error);
console.log('HighestCurPopulation >= 8 && LobbyUp == 1');
}
messageServerOn += '***```CSS\n' + 'Total number of players: ' + numberofallplayers + '\nServers: ' + numberofservers + '\n' + '```*** ' + '***`' + 'Statistics: `*** **https://steamcharts.com/app/17740' + '**';
......@@ -424,30 +428,35 @@ function RefreshSQL() {
ComePlayRolesPermission = 0;
}
if (numberofallplayers == 0 && LobbyUp == 1) {
// client.user.setActivity('Waiting for players');
client.user.setPresence({ activity: { name: 'Waiting for players', url: 'https://empiresmod.com' }, status: 'idle' }).catch(console.error);
// client.user.setStatus('idle');
}
// if (numberofallplayers == 0 && LobbyUp == 1) {
// // client.user.setActivity('Waiting for players');
// client.user.setPresence({ activity: { name: 'Waiting for players', url: 'https://empiresmod.com' }, status: 'idle' }).catch(console.error);
// console.log('numberofallplayers == 0 && LobbyUp == 1');
// // client.user.setStatus('idle');
// }
if (LobbyUp == 0) {
if (HighestCurPopulation == 0) {
client.user.setPresence({ activity: { name: 'Waiting for players', url: 'https://empiresmod.com' }, status: 'idle' }).catch(console.error);
// client.user.setStatus('idle');
console.log('HighestCurPopulation == 0 && LobbyUp == 0');
}
if (HighestCurPopulation == 1) {
// client.user.setStatus('available');
// client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ activity: { name: 'with player' + ' @' + namex[HighestPopServer], url: 'https://empiresmod.com' }, status: 'available' }).catch(console.error);
console.log('HighestCurPopulation == 1 && LobbyUp == 0');
}
if (HighestCurPopulation > 1 && HighestCurPopulation < 8) {
// client.user.setStatus('available');
// client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ activity: { name: 'with players' + ' @' + namex[HighestPopServer], url: 'https://empiresmod.com' }, status: 'available' }).catch(console.error);
console.log('HighestCurPopulation > 1 && HighestCurPopulation < 8 && LobbyUp == 0');
}
if (HighestCurPopulation >= 8) {
// client.user.setStatus('available');
// client.user.setActivity(numberofallplayers + ' players');
client.user.setPresence({ activity: { name: 'Game On!' + ' @' + namex[HighestPopServer], url: 'https://empiresmod.com' }, status: 'available' }).catch(console.error);
console.log('HighestCurPopulation >= 8 && LobbyUp == 0');
}
}
ComePlayNotifier();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment