diff --git a/build.gradle.kts b/build.gradle.kts index 905fae0..7d9279b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "io.github.gnuf0rce" -version = "1.4.1" +version = "1.4.2" mavenCentralPublish { useCentralS01() diff --git a/src/main/kotlin/io/github/gnuf0rce/mirai/rss/RssHelperPlugin.kt b/src/main/kotlin/io/github/gnuf0rce/mirai/rss/RssHelperPlugin.kt index bb2c0fc..6c06aee 100644 --- a/src/main/kotlin/io/github/gnuf0rce/mirai/rss/RssHelperPlugin.kt +++ b/src/main/kotlin/io/github/gnuf0rce/mirai/rss/RssHelperPlugin.kt @@ -1,17 +1,14 @@ package io.github.gnuf0rce.mirai.rss -import net.mamoe.mirai.console.* import net.mamoe.mirai.console.command.* import net.mamoe.mirai.console.command.CommandManager.INSTANCE.register import net.mamoe.mirai.console.command.CommandManager.INSTANCE.unregister import net.mamoe.mirai.console.data.* import net.mamoe.mirai.console.plugin.jvm.* -import net.mamoe.mirai.console.plugin.* -import net.mamoe.mirai.console.util.* @PublishedApi internal object RssHelperPlugin : KotlinPlugin( - JvmPluginDescription(id = "io.github.gnuf0rce.rss-helper", version = "1.4.1") { + JvmPluginDescription(id = "io.github.gnuf0rce.rss-helper", version = "1.4.2") { name("rss-helper") author("cssxsh") } @@ -22,11 +19,6 @@ internal object RssHelperPlugin : KotlinPlugin( private val data: List by services() override fun onEnable() { - // XXX: mirai console version check - check(SemVersion.parseRangeRequirement(">= 2.12.0-RC").test(MiraiConsole.version)) { - "$name $version 需要 Mirai-Console 版本 >= 2.12.0,目前版本是 ${MiraiConsole.version}" - } - for (config in config) config.reload() for (data in data) data.reload() for (command in commands) command.register() diff --git a/src/main/kotlin/io/github/gnuf0rce/rss/HttpClient.kt b/src/main/kotlin/io/github/gnuf0rce/rss/HttpClient.kt index f85e094..53d4704 100644 --- a/src/main/kotlin/io/github/gnuf0rce/rss/HttpClient.kt +++ b/src/main/kotlin/io/github/gnuf0rce/rss/HttpClient.kt @@ -179,7 +179,7 @@ internal class RubySSLSocketFactory(private val matcher: List) : SSLSocke private fun Socket.setServerNames(): Socket = apply { if (this !is SSLSocket) return@apply - val address = inetAddress.hostAddress + val address = inetAddress?.hostAddress ?: return@apply sslParameters = sslParameters.apply { serverNames = serverNames?.filter { name -> name !is SNIHostName || matcher.none { name.asciiName.matches(it) } diff --git a/src/test/resources/services/org.slf4j.spi.SLF4JServiceProvider b/src/test/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider similarity index 100% rename from src/test/resources/services/org.slf4j.spi.SLF4JServiceProvider rename to src/test/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider