go-ircevent/example/test.go
2010-08-06 23:25:03 +02:00

20 lines
366 B
Go

package main
import (
irc "github.com/thoj/Go-IRC-Client-Library"
"fmt"
"os"
)
func main() {
irccon := irc.IRC("testgo", "testgo")
err := irccon.Connect("irc.efnet.net:6667")
if err != nil {
fmt.Printf("%s\n", err)
fmt.Printf("%#v\n", irccon)
os.Exit(1)
}
irccon.AddCallback("001", func(e *irc.IRCEvent) { irccon.Join("#testgo") })
irccon.Loop();
}