summaryrefslogtreecommitdiffstats
path: root/main.go
blob: e9cb5308e626798745fe7f32e9f4c1d9f57cc4ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main

import "fmt"
import "github.com/go-irc/irc"
import flag"github.com/namsral/flag"

func testHandler(c *irc.Client, m *irc.Message) {
	fmt.Println("Client: %+v", c)
}

func main() {
	pass := flag.String("pass", "", "password")
	flag.Parse()
	config := irc.ClientConfig {
		Nick: "wat",
		Pass: *pass,
		User: "wat",
		Name: "wat",
		Handler: irc.HandlerFunc(testHandler),
	}
	fmt.Printf("Hello world %+v\n", config)
}