From 825e1c586e92f2213f2752c39435ae732020b59a Mon Sep 17 00:00:00 2001 From: Colin McDonald Date: Tue, 21 Jun 2016 10:50:59 -0400 Subject: [PATCH] Only create ip bans for bans and blacklists, not all punishments. Closes #22 --- .../net/frozenorb/apiv3/route/punishments/POSTUserPunish.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/frozenorb/apiv3/route/punishments/POSTUserPunish.java b/src/main/java/net/frozenorb/apiv3/route/punishments/POSTUserPunish.java index 65dd99c..63092f8 100644 --- a/src/main/java/net/frozenorb/apiv3/route/punishments/POSTUserPunish.java +++ b/src/main/java/net/frozenorb/apiv3/route/punishments/POSTUserPunish.java @@ -75,7 +75,7 @@ public final class POSTUserPunish implements Handler { String accessDenialReason = punishment.getAccessDenialReason(); String userIp = ctx.request().getParam("playerIp"); // TODO: YELL AT GRIFFIN FOR THIS, IT SHOULD BE USERIP - if (userIp != null) { + if ((type == Punishment.PunishmentType.BAN || type == Punishment.PunishmentType.BLACKLIST) && userIp != null) { IpBan ipBan = new IpBan(userIp, punishment); ipBan.insert();