mirror of https://github.com/fluffle/goirc
Update example client with changes.
This commit is contained in:
parent
961e38d7bf
commit
419dba1e75
|
@ -11,11 +11,12 @@ import (
|
|||
func main() {
|
||||
// create new IRC connection
|
||||
c := irc.New("GoTest", "gotest", "GoBot")
|
||||
c.Debug = true
|
||||
c.AddHandler("connected",
|
||||
func(conn *irc.Conn, line *irc.Line) { conn.Join("#go-nuts") })
|
||||
|
||||
// connect to server
|
||||
if err := c.Connect("irc.freenode.net", false); err != nil {
|
||||
if err := c.Connect("irc.freenode.net"); err != nil {
|
||||
fmt.Printf("Connection error: %s\n", err)
|
||||
return
|
||||
}
|
||||
|
@ -82,7 +83,7 @@ func main() {
|
|||
break
|
||||
}
|
||||
fmt.Println("Reconnecting...")
|
||||
if err := c.Connect("irc.freenode.net", false); err != nil {
|
||||
if err := c.Connect("irc.freenode.net"); err != nil {
|
||||
fmt.Printf("Connection error: %s\n", err)
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue