Update ConnectController.java

This commit is contained in:
Jgunishka 2019-08-21 21:20:40 +03:00
parent ae23056f3c
commit 49aa6d71f2

View File

@ -219,11 +219,12 @@ public class ConnectController extends UDPServer
else else
{ {
int privatePort = -1; int privatePort = -1;
int access = accessManager.getAccess(fromSocketAddress.getAddress());
try try
{ {
//SF MOD - Hammer Protection //SF MOD - Hammer Protection
if(connectedCount > 0){ if(access < AccessManager.ACCESS_ADMIN && connectedCount > 0){
if(lastAddress.equals(fromSocketAddress.getAddress().getHostAddress())){ if(lastAddress.equals(fromSocketAddress.getAddress().getHostAddress())){
lastAddressCount++; lastAddressCount++;
if(lastAddressCount >= 4){ if(lastAddressCount >= 4){