diff --git a/core/src/main/kotlin/matterlink/config/CommandConfig.kt b/core/src/main/kotlin/matterlink/config/CommandConfig.kt index 67ff33b..1848600 100644 --- a/core/src/main/kotlin/matterlink/config/CommandConfig.kt +++ b/core/src/main/kotlin/matterlink/config/CommandConfig.kt @@ -3,17 +3,15 @@ package matterlink.config import com.google.gson.Gson import com.google.gson.GsonBuilder import com.google.gson.JsonSyntaxException -import com.google.gson.stream.MalformedJsonException import matterlink.bridge.command.CommandType import matterlink.bridge.command.CustomCommand -import matterlink.bridge.command.IBridgeCommand import matterlink.instance import java.io.File object CommandConfig { private val gson: Gson = GsonBuilder().setPrettyPrinting().create() private val configFile: File = cfg.cfgDirectory.resolve("commands.json") - private val default = arrayOf( + private val default = arrayOf( CustomCommand( alias = "tps", type = CommandType.PASSTHROUGH, diff --git a/core/src/main/kotlin/matterlink/config/PermissionConfig.kt b/core/src/main/kotlin/matterlink/config/PermissionConfig.kt index 0e9f809..bcf25de 100644 --- a/core/src/main/kotlin/matterlink/config/PermissionConfig.kt +++ b/core/src/main/kotlin/matterlink/config/PermissionConfig.kt @@ -13,7 +13,12 @@ object PermissionConfig { private val gson: Gson = GsonBuilder().setPrettyPrinting().create() private val configFile: File = cfg.cfgDirectory.resolve("permissions.json") - private val default = PermissionMap() + private val default: PermissionMap = hashMapOf( + "irc.esper" to hashMapOf( + "~nikky@nikky.moe" to 0, + "user@example.com" to 0 + ) + ) var perms: PermissionMap = default diff --git a/core/src/main/kotlin/matterlink/update/UpdateChecker.kt b/core/src/main/kotlin/matterlink/update/UpdateChecker.kt index 30f36e9..b44a4f0 100644 --- a/core/src/main/kotlin/matterlink/update/UpdateChecker.kt +++ b/core/src/main/kotlin/matterlink/update/UpdateChecker.kt @@ -14,14 +14,19 @@ import java.io.BufferedReader class UpdateChecker : Runnable { override fun run() { + if (instance.modVersion.contains("-build")) { + instance.debug("Not checking updates on Jenkins build") + return + } + if (instance.modVersion.contains("-dev")) { + instance.debug("Not checking updates on developer build") + return + } + val gson = Gson() instance.info("Checking for new versions...") - if (instance.modVersion.endsWith("-dev")) { - - } - val client: HttpClient = HttpClients.createDefault() val request = HttpGet("https://goo.gl/5CMc1N") @@ -49,7 +54,8 @@ class UpdateChecker : Runnable { } val modVersionChunks = instance.modVersion - .replace("-dev", "") + .substringBefore("-dev") + .substringBefore("-build") .split('.') .map { it.toInt()