From f0a5d2396fd7307fefd883d4f794e7def003af45 Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 18 Dec 2015 20:54:28 +0100 Subject: Add option to specify configfile --- matterbridge.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matterbridge.go b/matterbridge.go index bd324608..80e97b35 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -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 {} } -- cgit v1.2.3