irc-webhooks/src/main.go

27 lines
509 B
Go
Raw Normal View History

2018-11-16 16:43:18 +00:00
package main
2018-11-16 20:34:38 +00:00
import "fmt"
2018-11-17 18:39:54 +00:00
2018-11-16 20:34:38 +00:00
const configPrint = `
CONFIG:
Secret: %q
BindHost: %q
BindPort: %q
`
2018-11-17 18:39:54 +00:00
func main() {
2018-11-16 19:31:45 +00:00
config := getConfig()
2018-11-16 20:34:38 +00:00
fmt.Printf(configPrint, config.Secret, config.BindHost, config.BindPort)
2018-11-17 18:39:54 +00:00
bc := BotConfig{
Nick: config.Nick,
Ident: config.Ident,
Realname: config.Realname,
ChansToJoin: config.ChansToJoin,
}
bot := newBot(bc, "chimera.snoonet.org", "6697", "snoonet", true)
2018-11-16 20:34:38 +00:00
2018-11-17 18:39:54 +00:00
go bot.run()
2018-11-16 19:31:45 +00:00
ListenForWebHook(config)
2018-11-16 16:43:18 +00:00
}