From 93a2bf949a274cdcd4821f0ee35dad0c6b1235ef Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 22 May 2025 01:08:19 +0800 Subject: [PATCH] Fix nslookup --- build.gradle.kts | 4 ---- .../cn/rtast/fancybot/commands/lookup/NslookupCommand.kt | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f52252b..a9bcb97 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -69,7 +69,3 @@ application { mainClass = "cn.rtast.fancybot.FancyBotKt" applicationName = "FancyBot" } - -kotlin { - jvmToolchain(17) -} \ No newline at end of file diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/lookup/NslookupCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/lookup/NslookupCommand.kt index 36972f7..b3f57e1 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/lookup/NslookupCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/lookup/NslookupCommand.kt @@ -76,7 +76,7 @@ class NslookupCommand : BaseCommand() { .addNewLine() .addText("$host -> $ip") .addNewLine() - .addText("国家: ${geo.country} 地区: ${geo.region} 城市: ${geo.city} | 所属组织: ${geo.org}") + .addText("国家: ${if (geo.country == "HK") "CN" else geo.country} 地区: ${geo.region} 城市: ${geo.city} | 所属组织: ${geo.org}") .build() messages.add(msg) }