More than one callback in example

This commit is contained in:
tj 2010-10-09 15:10:37 +02:00
parent e554b8b4a0
commit abc18957ff

View File

@ -1,7 +1,7 @@
package main package main
import ( import (
// irc "github.com/thoj/Go-IRC-Client-Library" // irc "github.com/thoj/Go-IRC-Client-Library"
"fmt" "fmt"
"os" "os"
"irc" "irc"
@ -27,5 +27,5 @@ func main() {
irccon.ReplaceCallback("001", 3, func(e *irc.IRCEvent) { irccon.Join("#testgo04") }) irccon.ReplaceCallback("001", 3, func(e *irc.IRCEvent) { irccon.Join("#testgo04") })
irccon.ReplaceCallback("001", 4, func(e *irc.IRCEvent) { irccon.Join("#testgo05") }) irccon.ReplaceCallback("001", 4, func(e *irc.IRCEvent) { irccon.Join("#testgo05") })
irccon.ReplaceCallback("001", 6, func(e *irc.IRCEvent) { irccon.Join("#testgo06") }) irccon.ReplaceCallback("001", 6, func(e *irc.IRCEvent) { irccon.Join("#testgo06") })
irccon.Loop(); irccon.Loop()
} }