5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-25 07:15:43 +00:00

Add option to specify configfile

This commit is contained in:
Wim 2015-12-18 20:54:28 +01:00
parent bdac03f725
commit f0a5d2396f

View File

@ -2,6 +2,7 @@ package main
import (
"crypto/tls"
"flag"
"github.com/42wim/matterbridge/matterhook"
"github.com/peterhellberg/giphy"
"github.com/thoj/go-ircevent"
@ -116,6 +117,8 @@ func (b *Bridge) giphyRandom(query []string) string {
}
func main() {
NewBridge("matterbot", NewConfig("matterbridge.conf"))
flagConfig := flag.String("conf", "matterbridge.conf", "config file")
flag.Parse()
NewBridge("matterbot", NewConfig(*flagConfig))
select {}
}