2018-10-20 01:40:15 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
import "github.com/go-irc/irc"
|
2018-10-21 13:57:23 +02:00
|
|
|
import "github.com/namsral/flag"
|
|
|
|
import "crypto/tls"
|
2018-10-20 01:58:30 +02:00
|
|
|
|
2018-10-21 13:57:23 +02:00
|
|
|
import "git.circuitco.de/self/watbot/wat"
|
2018-10-20 01:40:15 +02:00
|
|
|
|
|
|
|
func main() {
|
2018-10-20 01:58:30 +02:00
|
|
|
pass := flag.String("pass", "", "password")
|
|
|
|
flag.Parse()
|
2018-10-20 01:40:15 +02:00
|
|
|
config := irc.ClientConfig {
|
2018-10-21 13:57:23 +02:00
|
|
|
Nick: "watt",
|
2018-10-20 01:58:30 +02:00
|
|
|
Pass: *pass,
|
2018-10-21 13:57:23 +02:00
|
|
|
User: "wat/tripsit",
|
2018-10-20 01:40:15 +02:00
|
|
|
Name: "wat",
|
|
|
|
}
|
2018-10-21 13:57:23 +02:00
|
|
|
tcpConf := &tls.Config{
|
|
|
|
InsecureSkipVerify: true,
|
|
|
|
}
|
|
|
|
conn, err := tls.Dial("tcp", "127.0.0.1:9696", tcpConf)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println("err " + err.Error())
|
|
|
|
return
|
|
|
|
}
|
|
|
|
wwat := wat.NewWatBot(&config, conn)
|
|
|
|
wwat.Run()
|
2018-10-20 01:40:15 +02:00
|
|
|
}
|