Skip to content

Commit 8f1fd3f

Browse files
committed
allow disabling ips in webhook
1 parent 50e2a95 commit 8f1fd3f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/xyz/webmc/originblacklist/base/OriginBlacklist.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ private final void sendWebhooks(final OriginBlacklistLoginEvent event, final Enu
240240
player.getName().replaceAll("_", "\\_"),
241241
player.getOrigin(),
242242
player.getBrand(),
243-
player.getAddr(),
243+
this.config.get("discord.send_ips").getAsBoolean() ? player.getAddr() : "*\\*CENSORED\\**",
244244
player.getPVN(),
245245
userAgent,
246246
player.isRewind() ? "YES" : "NO",

src/main/java/xyz/webmc/originblacklist/base/config/OriginBlacklistConfig.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ private static final Json5Object getDefaultConfig() {
216216
final Json5Object dobj = new Json5Object();
217217
addJSONObj(dobj, "enabled", Json5Primitive.fromBoolean(false), null);
218218
addJSONObj(dobj, "webhook_urls", new Json5Array(), null);
219+
addJSONObj(dobj, "send_ips", Json5Primitive.fromBoolean(true), null);
219220
addJSONObj(obj, "discord", dobj, null);
220221
final Json5Object uobj = new Json5Object();
221222
addJSONObj(uobj, "enabled", Json5Primitive.fromBoolean(true), null);

0 commit comments

Comments
 (0)