diff --git a/.idea/misc.xml b/.idea/misc.xml
index 1bcb8e7..f648a66 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -5,6 +5,11 @@
+
diff --git a/README.md b/README.md
index 1c4de30..6739889 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# mobibot
[](https://opensource.org/licenses/BSD-3-Clause)
-[](https://kotlinlang.org)
+[](https://kotlinlang.org)
[](https://sonarcloud.io/summary/new_code?id=ethauvin_mobibot)
[](https://github.com/ethauvin/mobibot/actions/workflows/gradle.yml)
[](https://circleci.com/gh/ethauvin/mobibot/tree/master)
diff --git a/build.gradle b/build.gradle
index ff50536..a3677ef 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,5 @@
+import java.time.LocalDateTime
+import java.time.format.DateTimeFormatter
import io.gitlab.arturbosch.detekt.Detekt
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
@@ -10,7 +12,7 @@ plugins {
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
id 'org.jetbrains.kotlin.kapt' version '1.8.22'
- id 'org.jetbrains.kotlinx.kover' version '0.7.1'
+ id 'org.jetbrains.kotlinx.kover' version '0.7.2'
id 'org.sonarqube' version '4.2.1.3168'
id 'pmd'
}
@@ -54,17 +56,17 @@ dependencies {
// Commons (mostly for PircBotX)
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-text:1.10.0'
- implementation 'commons-codec:commons-codec:1.15'
+ implementation 'commons-codec:commons-codec:1.16.0'
implementation 'commons-net:commons-net:3.9.0'
// Google
implementation 'com.google.code.gson:gson:2.10.1'
- implementation 'com.google.guava:guava:32.0.1-jre'
+ implementation 'com.google.guava:guava:32.1.1-jre'
// Kotlin
implementation platform('org.jetbrains.kotlin:kotlin-bom')
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2'
implementation 'org.jetbrains.kotlinx:kotlinx-cli:0.3.5'
// Logging
@@ -77,7 +79,7 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
implementation 'net.aksingh:owm-japis:2.5.3.0'
implementation 'net.objecthunter:exp4j:0.4.8'
- implementation 'org.json:json:20230227'
+ implementation 'org.json:json:20230618'
implementation 'org.jsoup:jsoup:1.16.1'
// Thauvin
@@ -188,7 +190,7 @@ incrementBuildMeta {
if (isCI) {
println 'No increment with CI.'
} else {
- buildMeta = sprintf("%03d", (buildMeta as Integer) + 1)
+ buildMeta = DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now())
}
}
}
diff --git a/config/detekt/baseline.xml b/config/detekt/baseline.xml
index 356067c..0aa592e 100644
--- a/config/detekt/baseline.xml
+++ b/config/detekt/baseline.xml
@@ -27,7 +27,7 @@
MagicNumber:Mastodon.kt$Mastodon.Companion$200
MagicNumber:Mobibot.kt$Mobibot$8
MagicNumber:Modules.kt$Modules$7
- MagicNumber:Seen.kt$Seen$8
+ MagicNumber:Seen.kt$Seen$7
MagicNumber:SocialManager.kt$SocialManager$1000L
MagicNumber:SocialManager.kt$SocialManager$60L
MagicNumber:StockQuote.kt$StockQuote.Companion$10
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index c1962a7..033e24c 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 37aef8d..62f495d 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index aeb74cb..fcb6fca 100755
--- a/gradlew
+++ b/gradlew
@@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/commands/seen/Seen.kt b/src/main/kotlin/net/thauvin/erik/mobibot/commands/seen/Seen.kt
index fca143a..c9ee0f3 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/commands/seen/Seen.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/commands/seen/Seen.kt
@@ -69,9 +69,9 @@ class Seen(private val serialObject: String) : AbstractCommand() {
if (isEnabled()) {
if (args.isNotBlank() && !args.contains(' ')) {
val ch = event.bot().userChannelDao.getChannel(channel)
- if (args.equals(allKeyword) && ch.isOp(event.user) && seenNicks.isNotEmpty()) {
+ if (args == allKeyword && ch.isOp(event.user) && seenNicks.isNotEmpty()) {
event.sendMessage("The ${"seen".bold()} nicks are:")
- event.sendList(seenNicks.keys.toList(), 8, separator = ", ", isIndent = true)
+ event.sendList(seenNicks.keys.toList(), 7, separator = ", ", isIndent = true)
return
}
ch.users.forEach {
diff --git a/version.properties b/version.properties
index 9cd983c..b464c4e 100644
--- a/version.properties
+++ b/version.properties
@@ -1,9 +1,9 @@
#Generated by the Semver Plugin for Gradle
-#Sat Jun 17 21:28:53 PDT 2023
-version.buildmeta=1098
+#Sun Jul 02 02:19:45 PDT 2023
+version.buildmeta=20230702021945
version.major=0
version.minor=8
version.patch=0
version.prerelease=rc
version.project=mobibot
-version.semver=0.8.0-rc+1098
+version.semver=0.8.0-rc+20230702021945