Enable debug logs, join channels every time a 001 welcome event is received
This commit is contained in:
11
lysenko.go
11
lysenko.go
@@ -39,6 +39,13 @@ func main() {
|
|||||||
conn := irce.IRC(*nick, *ident)
|
conn := irce.IRC(*nick, *ident)
|
||||||
conn.UseTLS = *ssl
|
conn.UseTLS = *ssl
|
||||||
conn.Password = *nickserv
|
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 {
|
if err := conn.Connect(*host); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@@ -50,10 +57,6 @@ func main() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, channel := range channelList {
|
|
||||||
conn.Join(channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
db, err := quotedb.New(*quotes)
|
db, err := quotedb.New(*quotes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user