mirror of https://github.com/fluffle/goirc
Update README.
This commit is contained in:
parent
2bc8238f8e
commit
caa9429a74
13
README.md
13
README.md
|
@ -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.
|
||||||
|
|
||||||
|
|
|
@ -218,4 +218,3 @@ func (conn *Conn) h_671(line *Line) {
|
||||||
line.Args[1])
|
line.Args[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue