2018-10-20 01:40:15 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
import "github.com/go-irc/irc"
|
2018-10-20 01:58:30 +02:00
|
|
|
import flag"github.com/namsral/flag"
|
|
|
|
|
|
|
|
func testHandler(c *irc.Client, m *irc.Message) {
|
|
|
|
fmt.Println("Client: %+v", c)
|
|
|
|
}
|
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 {
|
|
|
|
Nick: "wat",
|
2018-10-20 01:58:30 +02:00
|
|
|
Pass: *pass,
|
2018-10-20 01:40:15 +02:00
|
|
|
User: "wat",
|
|
|
|
Name: "wat",
|
2018-10-20 01:58:30 +02:00
|
|
|
Handler: irc.HandlerFunc(testHandler),
|
2018-10-20 01:40:15 +02:00
|
|
|
}
|
2018-10-20 01:58:30 +02:00
|
|
|
fmt.Printf("Hello world %+v\n", config)
|
2018-10-20 01:40:15 +02:00
|
|
|
}
|