diff --git a/src/main/java/net/thauvin/erik/mobibot/modules/War.java b/src/main/java/net/thauvin/erik/mobibot/modules/War.java
index 7795e33..ddd56a2 100644
--- a/src/main/java/net/thauvin/erik/mobibot/modules/War.java
+++ b/src/main/java/net/thauvin/erik/mobibot/modules/War.java
@@ -44,7 +44,6 @@ import static net.thauvin.erik.mobibot.Utils.bold;
* The War module.
*
* @author Erik C. Thauvin
- * @created 2014-04-28
* @since 1.0
*/
public final class War extends AbstractModule {
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/Mobibot.kt b/src/main/kotlin/net/thauvin/erik/mobibot/Mobibot.kt
index 2bb5d56..af81bc8 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/Mobibot.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/Mobibot.kt
@@ -38,9 +38,9 @@ import net.thauvin.erik.mobibot.Utils.buildCmdSyntax
import net.thauvin.erik.mobibot.Utils.colorize
import net.thauvin.erik.mobibot.Utils.getIntProperty
import net.thauvin.erik.mobibot.Utils.helpFormat
-import net.thauvin.erik.mobibot.Utils.today
-import net.thauvin.erik.mobibot.Utils.toIsoLocalDate
import net.thauvin.erik.mobibot.Utils.toDir
+import net.thauvin.erik.mobibot.Utils.toIsoLocalDate
+import net.thauvin.erik.mobibot.Utils.today
import net.thauvin.erik.mobibot.commands.AddLog
import net.thauvin.erik.mobibot.commands.ChannelFeed
import net.thauvin.erik.mobibot.commands.Cycle
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/Utils.kt b/src/main/kotlin/net/thauvin/erik/mobibot/Utils.kt
index c5b4919..3a07ac3 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/Utils.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/Utils.kt
@@ -156,7 +156,7 @@ object Utils {
* Returns the plural form of a word, if count > 1.
*/
fun String.plural(count: Int, plural: String): String = this.plural(count.toLong(), plural)
-
+
/**
* Returns the plural form of a word, if count > 1.
*/
@@ -187,7 +187,7 @@ object Utils {
* Ensures that the given location (File/URL) has a trailing slash (`/`) to indicate a directory.
*/
@JvmStatic
- fun String.toDir(isUrl: Boolean = false) : String {
+ fun String.toDir(isUrl: Boolean = false): String {
return if (isUrl) {
if (this.last() == '/') {
this
@@ -229,7 +229,7 @@ object Utils {
* Returns the specified date formatted as `yyyy-MM-dd HH:mm`.
*/
@JvmStatic
- fun LocalDateTime.toUtcDateTime(): String = this.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))
+ fun LocalDateTime.toUtcDateTime(): String = this.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))
/**
* Converts XML/XHTML entities to plain text.
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/commands/Recap.kt b/src/main/kotlin/net/thauvin/erik/mobibot/commands/Recap.kt
index 775b9ce..2f21dc6 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/commands/Recap.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/commands/Recap.kt
@@ -33,8 +33,8 @@
package net.thauvin.erik.mobibot.commands
import net.thauvin.erik.mobibot.Mobibot
-import net.thauvin.erik.mobibot.Utils.toUtcDateTime
import net.thauvin.erik.mobibot.Utils.helpFormat
+import net.thauvin.erik.mobibot.Utils.toUtcDateTime
import java.time.Clock
import java.time.LocalDateTime
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/commands/tell/Tell.kt b/src/main/kotlin/net/thauvin/erik/mobibot/commands/tell/Tell.kt
index 9404287..72fd262 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/commands/tell/Tell.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/commands/tell/Tell.kt
@@ -117,13 +117,13 @@ class Tell(bot: Mobibot) : AbstractCommand(bot) {
*/
override val name = "tell"
- override val help = listOf(
- "To send a message to someone when they join the channel:",
- helpFormat("%c $name "),
- "To view queued and sent messages:",
- helpFormat("%c $name ${View.VIEW_CMD}"),
- "Messages are kept for ${bold(maxDays)}" + " day.".plural(maxDays, " days.")
- )
+ override val help = listOf(
+ "To send a message to someone when they join the channel:",
+ helpFormat("%c $name "),
+ "To view queued and sent messages:",
+ helpFormat("%c $name ${View.VIEW_CMD}"),
+ "Messages are kept for ${bold(maxDays)}" + " day.".plural(maxDays, " days.")
+ )
override val isOp: Boolean = false
override val isPublic: Boolean = isEnabled()
override val isVisible: Boolean = isEnabled()
@@ -224,7 +224,8 @@ class Tell(bot: Mobibot) : AbstractCommand(bot) {
save()
}
} else if (message.sender.equals(nickname, ignoreCase = true) && message.isReceived
- && !message.isNotified) {
+ && !message.isNotified
+ ) {
bot.send(
nickname,
"Your message ${reverseColor("[ID " + message.id + ']')} was sent to "
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/modules/GoogleSearch.kt b/src/main/kotlin/net/thauvin/erik/mobibot/modules/GoogleSearch.kt
index 80dc091..8184881 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/modules/GoogleSearch.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/modules/GoogleSearch.kt
@@ -35,8 +35,8 @@ import net.thauvin.erik.mobibot.Mobibot
import net.thauvin.erik.mobibot.Utils.capitalise
import net.thauvin.erik.mobibot.Utils.encodeUrl
import net.thauvin.erik.mobibot.Utils.helpFormat
-import net.thauvin.erik.mobibot.Utils.urlReader
import net.thauvin.erik.mobibot.Utils.unescapeXml
+import net.thauvin.erik.mobibot.Utils.urlReader
import net.thauvin.erik.mobibot.msg.Message
import net.thauvin.erik.mobibot.msg.NoticeMessage
import org.jibble.pircbot.Colors
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/modules/StockQuote.kt b/src/main/kotlin/net/thauvin/erik/mobibot/modules/StockQuote.kt
index 46423c3..4b4bec1 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/modules/StockQuote.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/modules/StockQuote.kt
@@ -179,7 +179,8 @@ class StockQuote(bot: Mobibot) : ThreadedModule(bot) {
add(NoticeMessage(" High: " + unescapeXml(quote.getString("03. high"))))
add(NoticeMessage(" Low: " + unescapeXml(quote.getString("04. low"))))
add(NoticeMessage(" Volume: " + unescapeXml(quote.getString("06. volume"))))
- add(NoticeMessage(
+ add(
+ NoticeMessage(
" Latest: " + unescapeXml(quote.getString("07. latest trading day"))
)
)
diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/modules/Weather2.kt b/src/main/kotlin/net/thauvin/erik/mobibot/modules/Weather2.kt
index 77631cd..238952b 100644
--- a/src/main/kotlin/net/thauvin/erik/mobibot/modules/Weather2.kt
+++ b/src/main/kotlin/net/thauvin/erik/mobibot/modules/Weather2.kt
@@ -36,8 +36,8 @@ import net.aksingh.owmjapis.core.OWM
import net.aksingh.owmjapis.core.OWM.Country
import net.aksingh.owmjapis.model.CurrentWeather
import net.thauvin.erik.mobibot.Mobibot
-import net.thauvin.erik.mobibot.Utils.capitalise
import net.thauvin.erik.mobibot.Utils.bold
+import net.thauvin.erik.mobibot.Utils.capitalise
import net.thauvin.erik.mobibot.Utils.encodeUrl
import net.thauvin.erik.mobibot.Utils.helpFormat
import net.thauvin.erik.mobibot.msg.ErrorMessage
diff --git a/src/test/kotlin/net/thauvin/erik/mobibot/UtilsTest.kt b/src/test/kotlin/net/thauvin/erik/mobibot/UtilsTest.kt
index a28aee5..0a77475 100644
--- a/src/test/kotlin/net/thauvin/erik/mobibot/UtilsTest.kt
+++ b/src/test/kotlin/net/thauvin/erik/mobibot/UtilsTest.kt
@@ -32,7 +32,7 @@
package net.thauvin.erik.mobibot
import net.thauvin.erik.mobibot.Utils.bold
-import net.thauvin.erik.mobibot.Utils.capitalize
+import net.thauvin.erik.mobibot.Utils.capitalise
import net.thauvin.erik.mobibot.Utils.colorize
import net.thauvin.erik.mobibot.Utils.cyan
import net.thauvin.erik.mobibot.Utils.getIntProperty
@@ -79,11 +79,10 @@ class UtilsTest {
}
@Test
- fun testCapitalize() {
- assertThat(capitalize("test")).describedAs("capitalize(test)").isEqualTo("Test")
- assertThat(capitalize("Test")).describedAs("capitalize(Test)").isEqualTo("Test")
- assertThat(capitalize(null)).describedAs("captitalize(null)").isNull()
- assertThat(capitalize("")).describedAs("capitalize()").isEqualTo("")
+ fun testCapitalise() {
+ assertThat("test".capitalise()).describedAs("capitalize(test)").isEqualTo("Test")
+ assertThat("Test".capitalise()).describedAs("capitalize(Test)").isEqualTo("Test")
+ assertThat("".capitalise()).describedAs("capitalize()").isEqualTo("")
}
@Test
@@ -168,8 +167,9 @@ class UtilsTest {
@Throws(IOException::class)
fun testUrlReader() {
assertThat(urlReader(URL("https://postman-echo.com/status/200"))).describedAs("urlReader()")
- .isEqualTo("{\"status\":200}"
- )
+ .isEqualTo(
+ "{\"status\":200}"
+ )
}
@Test
diff --git a/version.properties b/version.properties
index 88ee6f9..5c5888f 100644
--- a/version.properties
+++ b/version.properties
@@ -1,9 +1,9 @@
#Generated by the Semver Plugin for Gradle
-#Fri May 14 20:13:13 PDT 2021
-version.buildmeta=782
+#Fri May 14 21:44:23 PDT 2021
+version.buildmeta=787
version.major=0
version.minor=8
version.patch=0
version.prerelease=beta
version.project=mobibot
-version.semver=0.8.0-beta+782
+version.semver=0.8.0-beta+787