summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-09-30 23:19:47 +0200
committerWim <wim@42.be>2016-09-30 23:19:47 +0200
commitfff6f08cb63cde691a3d5fb8f1c109cbdb470c58 (patch)
tree3f6e7f0ec55ff2f8e02427b6e579daf840ce42b6 /matterbridge.go
parent0e527a4252796c5f9615edc9412394bc4805e78a (diff)
downloadmatterbridge-msglm-fff6f08cb63cde691a3d5fb8f1c109cbdb470c58.tar.gz
matterbridge-msglm-fff6f08cb63cde691a3d5fb8f1c109cbdb470c58.tar.bz2
matterbridge-msglm-fff6f08cb63cde691a3d5fb8f1c109cbdb470c58.zip
Add samechannel gateway. See #35
Diffstat (limited to 'matterbridge.go')
-rw-r--r--matterbridge.go14
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