From dcff5ed22fabf4d39e4304caeaa84026d86f1a12 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 10 Dec 2020 15:17:25 +0100 Subject: [PATCH] Add Extending Ban of Account with same IP --- src/de/steamwar/bungeecore/sql/SteamwarUser.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/de/steamwar/bungeecore/sql/SteamwarUser.java b/src/de/steamwar/bungeecore/sql/SteamwarUser.java index 61625eab..66b1d362 100644 --- a/src/de/steamwar/bungeecore/sql/SteamwarUser.java +++ b/src/de/steamwar/bungeecore/sql/SteamwarUser.java @@ -214,6 +214,12 @@ public class SteamwarUser { if(player != null){ updateBanIP(player.getAddress().getAddress().getHostAddress()); player.disconnect(banMessage()); + for (BannedUserIPs banned: + BannedUserIPs.get(player.getAddress().getAddress().getHostAddress())) { + SteamwarUser bannedUser = SteamwarUser.get(banned.getUserID()); + if(bannedUser.isBanned() && banned.getTimestamp().before(time)) + bannedUser.ban(time, bannedUser.banReason); + } }else updateBanIP(""); }