diff options
Diffstat (limited to 'matterbridge.go')
-rw-r--r-- | matterbridge.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/matterbridge.go b/matterbridge.go index 689a08df..58916a65 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -8,7 +8,7 @@ import ( log "github.com/Sirupsen/logrus" ) -var version = "0.5.0-beta2" +var version = "0.6.0-dev" func init() { log.SetFormatter(&log.TextFormatter{FullTimestamp: true}) @@ -18,7 +18,7 @@ func main() { flagConfig := flag.String("conf", "matterbridge.conf", "config file") flagDebug := flag.Bool("debug", false, "enable debug") flagVersion := flag.Bool("version", false, "show version") - flagPlus := flag.Bool("plus", false, "running using API instead of webhooks") + flagPlus := flag.Bool("plus", false, "running using API instead of webhooks (deprecated, set Plus flag in [general] config)") flag.Parse() if *flagVersion { fmt.Println("version:", version) @@ -30,10 +30,12 @@ func main() { log.SetLevel(log.DebugLevel) } fmt.Println("running version", version) + cfg := config.NewConfig(*flagConfig) if *flagPlus { - bridge.NewBridge("matterbot", config.NewConfig(*flagConfig), "") - } else { - bridge.NewBridge("matterbot", config.NewConfig(*flagConfig), "legacy") + cfg.General.Plus = true + } + err := bridge.NewBridge(cfg) + if err != nil { + log.Debugf("starting bridge failed %#v", err) } - select {} } |