From 54e6e6dd87075b76e44f38be7054c03218c8c9e1 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 28 Nov 2021 23:27:32 -0800 Subject: [PATCH] Cleaned up. --- src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt | 4 ++-- src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt b/src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt index bc527f0..716d829 100644 --- a/src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt +++ b/src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt @@ -60,8 +60,8 @@ class Addons { if (isEnabled) { modules.add(this) - modulesNames.add(this.javaClass.simpleName) - names.addAll(this.commands) + modulesNames.add(javaClass.simpleName) + names.addAll(commands) } } } diff --git a/src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt b/src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt index 8083c74..16bd365 100644 --- a/src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt +++ b/src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt @@ -110,7 +110,7 @@ class Pinboard { */ private fun Date.toTimestamp(): String { return ZonedDateTime.ofInstant( - this.toInstant().truncatedTo(ChronoUnit.SECONDS), + toInstant().truncatedTo(ChronoUnit.SECONDS), ZoneId.systemDefault() ).format(DateTimeFormatter.ISO_INSTANT) } @@ -119,7 +119,7 @@ class Pinboard { * Returns the pinboard.in extended attribution line. */ private fun EntryLink.postedBy(ircServer: String): String { - return "Posted by ${this.nick} on ${this.channel} ( $ircServer )" + return "Posted by $nick on $channel ( $ircServer )" } }