20 lines
328 B
Go
20 lines
328 B
Go
package main
|
|
|
|
import (
|
|
"irc"
|
|
"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();
|
|
}
|