watbot/main.go
2021-03-10 19:33:48 +05:30

41 lines
759 B
Go

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))
config := irc.ClientConfig{
Nick: "watt",
Pass: *pass,
User: "wat",
Name: "wat",
}
watConfig := wat.WatConfig{
PermittedChannels: []string{
"#lucy",
"#sweden",
},
IgnoredHosts: []string{
"tripsit/user/creatonez",
},
}
tcpConf := &tls.Config{
InsecureSkipVerify: true,
}
conn, err := tls.Dial("tcp", "127.0.0.1:6697", tcpConf)
if err != nil {
fmt.Println("err " + err.Error())
return
}
wwat := wat.NewWatBot(&config, &watConfig, conn)
wwat.Run()
}