diff options
Diffstat (limited to 'matterbridge.go')
-rw-r--r-- | matterbridge.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/matterbridge.go b/matterbridge.go index 470c6056..28a76fa1 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/42wim/matterbridge/bridge/config" "github.com/42wim/matterbridge/gateway" + "github.com/42wim/matterbridge/gateway/samechannel" log "github.com/Sirupsen/logrus" ) @@ -30,6 +31,19 @@ func main() { } fmt.Println("running version", version) cfg := config.NewConfig(*flagConfig) + for _, gw := range cfg.SameChannelGateway { + if !gw.Enable { + continue + } + fmt.Printf("starting samechannel gateway %#v\n", gw.Name) + go func(gw config.SameChannelGateway) { + err := samechannelgateway.New(cfg, &gw) + if err != nil { + log.Debugf("starting gateway failed %#v", err) + } + }(gw) + } + for _, gw := range cfg.Gateway { if !gw.Enable { continue |