Update README.

This commit is contained in:
Alex Bramley 2011-11-06 05:22:02 +00:00
parent 2bc8238f8e
commit caa9429a74
2 changed files with 8 additions and 6 deletions

View File

@ -18,11 +18,12 @@ This will connect to freenode and join `#go-nuts` by default, so be careful ;-)
Synopsis:
import "flag"
import irc "github.com/fluffle/goirc/client"
func main() {
c := irc.New("nick", "ident", "real name")
// Optionally, turn on debugging
c.Debug = true
flag.Parse() // parses the logging flags.
c := irc.New("nick", "ident", "real name", false, nil, nil)
// Optionally, enable SSL
c.SSL = true
@ -53,8 +54,10 @@ the messages from the IRC server, so you have to handle e.g. "332" for
`RPL_TOPIC` to get the topic for a channel.
The vast majority of handlers implemented within the framework deal with state
tracking of all nicks in any channels that the client is also present in. It's
likely that this state tracking will become optional in the near future.
tracking of all nicks in any channels that the client is also present in. These
handers are in `client/state_handlers.go`. State tracking is optional, and can
be enabled by passing `true` as the fourth argument to `client.New()`. This API
sucks and may change in the future.
### Misc.

View File

@ -218,4 +218,3 @@ func (conn *Conn) h_671(line *Line) {
line.Args[1])
}
}