return;
if(data[0]!=_SERVER_KEY)
{
if(LOG_OPTION.contains("NOPROTECT"))
_log.info("CatsGuard: Client "+cl+" try to log with no CatsGuard");
cl.close(new LeaveWorld());
return;
}
String hwid = String.format("%x", data[3]);
if(cl._reader==null)
{
if(LOG_OPTION.contains("HACK"))
_log.info("CatsGuard: Client "+cl+" has no pre-authed state");
cl.close(new LeaveWorld());
return;
}
if(_bannedhwid.contains(hwid))
{
((CatsGuardReader) cl._reader)._checkChar = true;
}
if(!_connections.containsKey(hwid))
_connections.put(hwid,0);
int nwindow = _connections.get(hwid);
int max = MAX_SESSIONS;
if (_premium.contains(hwid))
max = MAX_PREMIUM_SESSIONS;
if(max > 0 && ++nwindow>max)
{
if(LOG_OPTION.contains("SESSIONS"))
_log.info("CatsGuard: To many sessions from hwid "+hwid);
cl.close(new LeaveWorld());
return;
}
if (!_premium.contains(hwid))
_premium.add(hwid);
_connections.put(hwid, nwindow);