diff --git a/imperium-common/src/main/kotlin/com/xpdustry/imperium/common/misc/DiscordExtensions.kt b/imperium-common/src/main/kotlin/com/xpdustry/imperium/common/misc/DiscordExtensions.kt index 10f27a15..4889f0f3 100644 --- a/imperium-common/src/main/kotlin/com/xpdustry/imperium/common/misc/DiscordExtensions.kt +++ b/imperium-common/src/main/kotlin/com/xpdustry/imperium/common/misc/DiscordExtensions.kt @@ -22,4 +22,4 @@ import java.net.URL val BLURPLE = Color(0x5865F2) -val DISCORD_INVITATION_LINK = URL("https://discord.gg/chaotic-neutral-519293558599974912") +val DISCORD_INVITATION_LINK = URL("https://discord.xpdustry.com") diff --git a/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/VpnGatekeeper.kt b/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/VpnGatekeeper.kt index c5b6c467..14956e65 100644 --- a/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/VpnGatekeeper.kt +++ b/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/security/VpnGatekeeper.kt @@ -17,6 +17,7 @@ */ package com.xpdustry.imperium.mindustry.security +import com.xpdustry.imperium.common.misc.DISCORD_INVITATION_LINK import com.xpdustry.imperium.common.misc.LoggerDelegate import com.xpdustry.imperium.common.network.VpnDetection import com.xpdustry.imperium.common.security.AddressWhitelist @@ -30,7 +31,17 @@ class VpnGatekeeper(private val provider: VpnDetection, private val whitelist: A } val result = provider.isVpn(context.address) if (result is VpnDetection.Result.Success) { - return if (result.vpn) GatekeeperResult.Failure("VPN detected") + // TODO Add proper command for ip unblocks, such as "/request unblock" + return if (result.vpn) + GatekeeperResult.Failure( + """ + [red]VPN detected.[] + [lightgray]If you think this is a false positive or using a VPN is necessary to you, + join our discord server at [accent]${DISCORD_INVITATION_LINK}[]. + Then ask for an IP unblock in the [accent]#appeals[] channel. + [red]Warning: During the process, only share you IP address to an admin [orange](${context.address.hostAddress})[].[] + """ + .trimIndent()) else GatekeeperResult.Success } if (result is VpnDetection.Result.Failure) {