From 930b639cc9cd2d2873302f30303378c0e53816a8 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 18 Feb 2017 23:00:46 +0100 Subject: Update vendor --- .../thoj/go-ircevent/examples/simple/simple.go | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 vendor/github.com/thoj/go-ircevent/examples/simple/simple.go (limited to 'vendor/github.com/thoj') diff --git a/vendor/github.com/thoj/go-ircevent/examples/simple/simple.go b/vendor/github.com/thoj/go-ircevent/examples/simple/simple.go new file mode 100644 index 00000000..f2c27c60 --- /dev/null +++ b/vendor/github.com/thoj/go-ircevent/examples/simple/simple.go @@ -0,0 +1,27 @@ +package main + +import ( + "github.com/thoj/go-ircevent" + "crypto/tls" + "fmt" +) + +const channel = "#go-eventirc-test"; +const serverssl = "irc.freenode.net:7000" + +func main() { + ircnick1 := "blatiblat" + irccon := irc.IRC(ircnick1, "IRCTestSSL") + irccon.VerboseCallbackHandler = true + irccon.Debug = true + irccon.UseTLS = true + irccon.TLSConfig = &tls.Config{InsecureSkipVerify: true} + irccon.AddCallback("001", func(e *irc.Event) { irccon.Join(channel) }) + irccon.AddCallback("366", func(e *irc.Event) { }) + err := irccon.Connect(serverssl) + if err != nil { + fmt.Printf("Err %s", err ) + return + } + irccon.Loop() +} -- cgit v1.2.3