This commit is contained in:
NikkyAI 2018-03-08 16:06:57 +01:00
parent 02c9cb076d
commit ada8a3ac89
2 changed files with 3 additions and 11 deletions

View File

@ -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"
))

View File

@ -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(