oops
This commit is contained in:
parent
02c9cb076d
commit
ada8a3ac89
|
@ -41,7 +41,7 @@ object MessageHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun stop(message: String?) {
|
fun stop(message: String?) {
|
||||||
if (message != null && cfg.debug.announceDisconnect) {
|
if (message != null && cfg.outgoing.announceDisconnect) {
|
||||||
transmit(ApiMessage(
|
transmit(ApiMessage(
|
||||||
text = message
|
text = message
|
||||||
))
|
))
|
||||||
|
@ -64,7 +64,7 @@ object MessageHandler {
|
||||||
streamConnection.open()
|
streamConnection.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message != null && cfg.debug.announceConnect) {
|
if (message != null && cfg.outgoing.announceConnect) {
|
||||||
transmit(ApiMessage(
|
transmit(ApiMessage(
|
||||||
text = message //?: "Connected to matterbridge API"
|
text = message //?: "Connected to matterbridge API"
|
||||||
))
|
))
|
||||||
|
|
|
@ -6,12 +6,6 @@ import java.util.regex.Pattern
|
||||||
lateinit var cfg: BaseConfig
|
lateinit var cfg: BaseConfig
|
||||||
|
|
||||||
abstract class BaseConfig(rootDir: File) {
|
abstract class BaseConfig(rootDir: File) {
|
||||||
companion object {
|
|
||||||
fun reload() {
|
|
||||||
cfg = cfg.load()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val cfgDirectory: File = rootDir.resolve("matterlink")
|
val cfgDirectory: File = rootDir.resolve("matterlink")
|
||||||
val mainCfgFile: File = cfgDirectory.resolve("matterlink.cfg")
|
val mainCfgFile: File = cfgDirectory.resolve("matterlink.cfg")
|
||||||
|
|
||||||
|
@ -112,10 +106,8 @@ abstract class BaseConfig(rootDir: File) {
|
||||||
addCustomCategoryComment: (key: String, comment: String) -> Unit
|
addCustomCategoryComment: (key: String, comment: String) -> Unit
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var category = "root"
|
var category = "commands"
|
||||||
|
|
||||||
|
|
||||||
category = "commands"
|
|
||||||
addCustomCategoryComment(category, "User commands")
|
addCustomCategoryComment(category, "User commands")
|
||||||
command = CommandOptions(
|
command = CommandOptions(
|
||||||
enable = getBoolean(
|
enable = getBoolean(
|
||||||
|
|
Loading…
Reference in New Issue