Add 'Clans' to the ignored server groups for ServerMonitor to prevent interference with live Clans servers.

This commit is contained in:
Ty Sayers 2015-08-29 14:51:17 -07:00
parent 9ebabed1a8
commit 088068be80

View File

@ -246,7 +246,7 @@ public class ServerMonitor
for (MinecraftServer minecraftServer : _serverStatuses)
{
if (minecraftServer.getGroup().equalsIgnoreCase("Testing"))
if (ignoreServer(minecraftServer.getGroup()))
continue;
onlineServers.add(minecraftServer.getName());
@ -288,7 +288,7 @@ public class ServerMonitor
for (ServerGroup serverGroup : _serverGroups)
{
if (serverGroup.getName().equals("Testing"))
if (ignoreServer(serverGroup.getName()))
continue;
try
@ -388,7 +388,7 @@ public class ServerMonitor
_deadServers.clear();
for (MinecraftServer deadServer : _repository.getDeadServers())
{
if (deadServer.getUptime() <= 10 || deadServer.getGroup().equalsIgnoreCase("Testing"))
if (deadServer.getUptime() <= 10 || ignoreServer(deadServer.getGroup()))
continue;
if (_count == 0 || deadServers.contains(deadServer.getName()))
@ -486,7 +486,7 @@ public class ServerMonitor
if (joinableServers > maxUHC)
serversToKill = maxUHC - joinableServers;
}
else if (serverGroup.getName().equalsIgnoreCase("Testing"))
else if (ignoreServer(serverGroup.getName()))
{
return;
}
@ -691,6 +691,11 @@ public class ServerMonitor
_processes.add(pr);
}
private static boolean ignoreServer(String serverGroupName)
{
return serverGroupName.equalsIgnoreCase("Testing") || serverGroupName.equalsIgnoreCase("Clans");
}
private static void log(String message)
{
log(message, false);