Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2015-08-29 14:55:04 -07:00
commit c2c23c22e5

View File

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