watbot/main.go

41 lines
767 B
Go
Raw Normal View History

package main
import "fmt"
import "crypto/tls"
import "github.com/go-irc/irc"
import "github.com/namsral/flag"
import "git.circuitco.de/self/watbot/wat"
func main() {
pass := flag.String("pass", "", "password")
flag.Parse()
fmt.Printf("PASS len %d\n", len(*pass))
2019-01-04 10:55:40 +01:00
config := irc.ClientConfig{
Nick: "watbot",
Pass: *pass,
User: "watbot",
Name: "watbot",
}
2019-01-04 10:55:40 +01:00
watConfig := wat.WatConfig{
PermittedChannels: []string{
2021-03-10 15:03:48 +01:00
"#lucy",
"#sweden",
2019-01-04 10:55:40 +01:00
},
IgnoredHosts: []string{
"tripsit/user/creatonez",
},
}
tcpConf := &tls.Config{
InsecureSkipVerify: false,
}
conn, err := tls.Dial("tcp", "irc.casa:6697", tcpConf)
if err != nil {
fmt.Println("err " + err.Error())
return
}
2019-01-04 10:55:40 +01:00
wwat := wat.NewWatBot(&config, &watConfig, conn)
wwat.Run()
}