Update README, fix whitespace fail.

This commit is contained in:
Alex Bramley 2011-10-06 21:33:02 +01:00
parent d119e6bca0
commit a4ac0dd1b7
1 changed files with 17 additions and 17 deletions

View File

@ -30,18 +30,18 @@ Synopsis:
// e.g. join a channel on connect.
c.AddHandler("connected",
func(conn *irc.Conn, line *irc.Line) { conn.Join("#channel") })
// And a signal on disconnect
quit := make(chan bool)
c.AddHandler("disconnected),
func(conn *irc.Conn, line *irc.Line) { quit <- true }
// Tell client to connect
if err := c.Connect("irc.freenode.net"); err != nil {
fmt.Printf("Connection error: %s\n", err.String())
}
// Loop until client gets disconnected, printing any errors
for c.Connected {
if err := <-c.Err; err != nil {
fmt.Printf("goirc error: %s", err.String())
}
}
// Wait for disconnect
<-quit
}
The test client provides a good (if basic) example of how to use the framework.