summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2015-12-12 12:35:30 +0100
committerRobert Gerus <arachnist@i.am-a.cat>2015-12-12 12:35:30 +0100
commit6bc3f2fdd4b18106b0fccd37e5df9303e054bc09 (patch)
treea1040d62b2cd8a090ee15c8c7c2001668e98fb73
parentbe84e9ddcc7adff8fa4979215f8cedbb83ac1f61 (diff)
downloadgorepost-6bc3f2fdd4b18106b0fccd37e5df9303e054bc09.tar.gz
gorepost-6bc3f2fdd4b18106b0fccd37e5df9303e054bc09.tar.bz2
gorepost-6bc3f2fdd4b18106b0fccd37e5df9303e054bc09.tar.xz
gorepost-6bc3f2fdd4b18106b0fccd37e5df9303e054bc09.zip
Adjust main file to changes in config.
-rw-r--r--gorepost.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/gorepost.go b/gorepost.go
index 5faf31f..7b726d9 100644
--- a/gorepost.go
+++ b/gorepost.go
@@ -11,7 +11,7 @@ import (
"path"
"github.com/arachnist/gorepost/bot"
- cfg "github.com/arachnist/gorepost/config"
+ "github.com/arachnist/gorepost/config"
"github.com/arachnist/gorepost/irc"
)
@@ -50,7 +50,7 @@ func main() {
log.Fatalln("Not a directory:", os.Args[1])
}
- cfg.SetFileListBuilder(fileListFuncBuilder(os.Args[1], "common.json"))
+ cfg := config.New(fileListFuncBuilder(os.Args[1], "common.json"))
logfile, err := os.OpenFile(cfg.LookupString(context, "Logpath"), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
if err != nil {
@@ -65,7 +65,7 @@ func main() {
for i, conn := range make([]irc.Connection, len(networks)) {
conn := conn
log.Println("Setting up", networks[i], "connection")
- conn.Setup(bot.Dispatcher, networks[i])
+ conn.Setup(bot.Dispatcher, networks[i], cfg)
}
<-exit
}