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