summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index bd3552a..df8cd25 100644
--- a/main.go
+++ b/main.go
@@ -17,6 +17,12 @@ func main() {
if err != nil {
log.Fatal(err)
}
+ con.AddCallback("001", func(e *irc.Event) {
+ if fjoin := os.Getenv("WEB2IRC_IRC_JOIN"); fjoin != "" {
+ con.Join("#" + fjoin)
+ }
+ })
+
r := mux.NewRouter()
r.HandleFunc("/", IndexHandler)
r.HandleFunc("/webhook", WebhookHandler).Methods("POST")