Only create ip bans for bans and blacklists, not all punishments. Closes #22

This commit is contained in:
Colin McDonald 2016-06-21 10:50:59 -04:00
parent 4ba3dcd907
commit 825e1c586e

View File

@ -75,7 +75,7 @@ public final class POSTUserPunish implements Handler<RoutingContext> {
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();