28 lines
487 B
Go
28 lines
487 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"golang.zx2c4.com/irc/hbot"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
func init() {
|
|
ConfInit()
|
|
}
|
|
|
|
func main() {
|
|
bot := hbot.NewBot(&hbot.Config{
|
|
Host: string(Config.Host),
|
|
Nick: string(Config.Nick),
|
|
Channels: strings.Split(Config.Channel, ","),
|
|
})
|
|
fmt.Println("Starting haruhi")
|
|
fmt.Printf("-- Version: %s -- \n", FullVersion())
|
|
fmt.Printf("Joining %s as %s at %s\n", Config.Host, Config.Nick, Config.Channel)
|
|
for {
|
|
bot.Run()
|
|
time.Sleep(time.Second + 5)
|
|
}
|
|
}
|