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: Synopsis:
import "flag"
import irc "github.com/fluffle/goirc/client" import irc "github.com/fluffle/goirc/client"
func main() { func main() {
c := irc.New("nick", "ident", "real name") flag.Parse() // parses the logging flags.
// Optionally, turn on debugging c := irc.New("nick", "ident", "real name", false, nil, nil)
c.Debug = true
// Optionally, enable SSL // Optionally, enable SSL
c.SSL = true 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. `RPL_TOPIC` to get the topic for a channel.
The vast majority of handlers implemented within the framework deal with state 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 tracking of all nicks in any channels that the client is also present in. These
likely that this state tracking will become optional in the near future. 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. ### Misc.

View File

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