From a88b866b63e3ab4db307c864b0d160bb9eaccc1c Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Sat, 16 Feb 2013 11:04:06 +0000 Subject: [PATCH] Fix up README and example client. --- README.md | 6 +++--- client.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5f22864..0f8bc11 100644 --- a/README.md +++ b/README.md @@ -18,17 +18,17 @@ Synopsis: func main() { flag.Parse() // parses the logging flags. - c := irc.SimpleClient("nick") + c := irc.Client("nick") // Optionally, enable SSL c.SSL = true // Add handlers to do things here! // e.g. join a channel on connect. - c.AddHandler("connected", + c.HandleFunc("connected", func(conn *irc.Conn, line *irc.Line) { conn.Join("#channel") }) // And a signal on disconnect quit := make(chan bool) - c.AddHandler("disconnected", + c.HandleFunc("disconnected", func(conn *irc.Conn, line *irc.Line) { quit <- true }) // Tell client to connect diff --git a/client.go b/client.go index de4ae52..848bd41 100644 --- a/client.go +++ b/client.go @@ -16,14 +16,14 @@ func main() { flag.Parse() // create new IRC connection - c := irc.SimpleClient("GoTest", "gotest") + c := irc.Client("GoTest", "gotest") c.EnableStateTracking() - c.AddHandler("connected", + c.HandleFunc("connected", func(conn *irc.Conn, line *irc.Line) { conn.Join(*channel) }) // Set up a handler to notify of disconnect events. quit := make(chan bool) - c.AddHandler("disconnected", + c.HandleFunc("disconnected", func(conn *irc.Conn, line *irc.Line) { quit <- true }) // set up a goroutine to read commands from stdin