Skip to content

Commit

Permalink
Allow to have multiple bots running.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gentux committed Jun 3, 2015
1 parent eaec648 commit 126fd63
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions guilhem.go → bots.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ package main
import irc "github.com/fluffle/goirc/client"
import "math/rand"

const (
channelName = "#poc_beta_guilhem"
channelNick = "GuilhemBot"
)
const channelName = "#poc_beta_test"

func handleMessage(conn *irc.Conn, line *irc.Line) {
func handleMessageGuilhem(conn *irc.Conn, line *irc.Line) {
answers := []string{
"Mais ! C'est de la merde !",
"On doit le réecrire en GO ça !",
Expand All @@ -25,5 +22,9 @@ func handleMessage(conn *irc.Conn, line *irc.Line) {
}

func main() {
connect(channelName, channelNick, handleMessage)
// Guilhem
go connect(channelName, "GuilhemBot", handleMessageGuilhem)

// Gentux (for concurency tests)
//connect(channelName, "GentuxBot", handleMessageGuilhem)
}

0 comments on commit 126fd63

Please sign in to comment.