diff --git a/src/de/steamwar/bungeecore/ErrorLogger.java b/src/de/steamwar/bungeecore/ErrorLogger.java index 829317f..64ebcc1 100644 --- a/src/de/steamwar/bungeecore/ErrorLogger.java +++ b/src/de/steamwar/bungeecore/ErrorLogger.java @@ -11,6 +11,7 @@ import java.util.logging.LogRecord; public class ErrorLogger extends Handler implements Filter { private static ErrorLogger instance; + private int ddosRate = 0; ErrorLogger(){ ProxyServer.getInstance().getLogger().addHandler(this); @@ -40,6 +41,10 @@ public class ErrorLogger extends Handler implements Filter { String stacktraceString = stacktrace.toString(); if(stacktraceString.contains("Cannot request protocol")){ + ddosRate++; + if(ddosRate % 1000 == 0){ + SWException.log("Bungee", "DDOS", ddosRate + ""); + } return false; } return true;