Enable debug logs, join channels every time a 001 welcome event is received

This commit is contained in:
2016-09-10 01:58:17 +01:00
parent 38982bf2c9
commit 9885a48feb

View File

@@ -39,6 +39,13 @@ func main() {
conn := irce.IRC(*nick, *ident)
conn.UseTLS = *ssl
conn.Password = *nickserv
conn.Debug = true
conn.AddCallback("001", func(e *irce.Event) {
for _, channel := range channelList {
conn.Join(channel)
}
})
if err := conn.Connect(*host); err != nil {
log.Fatal(err)
@@ -50,10 +57,6 @@ func main() {
log.Fatal(err)
}
for _, channel := range channelList {
conn.Join(channel)
}
ctx := context.Background()
db, err := quotedb.New(*quotes)
if err != nil {