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

Fix Game on! detection

parent fba42a52
......@@ -205,11 +205,17 @@ function RefreshSQL()
//};
}
var HighestCurPopulation = 0;
for (i = 0; i < numberofservers; i++)
{
if (namex[i] != 'Empires Lobby')
{
if (HighestCurPopulation < playersx[i])
{
HighestCurPopulation = playersx[i];
}
playersoutoflobby = playersoutoflobby + playersx[i];
if (xpx[i] == 1)
......@@ -254,7 +260,7 @@ function RefreshSQL()
client.user.setStatus('idle');
}
if (playersoutoflobby >= 8)
if (HighestCurPopulation >= 8)
{
client.user.setStatus('available');
//client.user.setActivity(numberofallplayers + ' players');
......@@ -266,8 +272,6 @@ function RefreshSQL()
if (numberofallplayers == 0)
{
//client.user.setActivity('Waiting for players');
client.user.setPresence({ game: { name: "Waiting for players", type: "Playing", url: "https://empiresmod.com"}});
client.user.setStatus('idle');
......
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