We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e346297 commit 999afbaCopy full SHA for 999afba
main.go
@@ -5,8 +5,8 @@ import (
5
"net/http"
6
"os"
7
"os/signal"
8
- "syscall"
9
"strings"
+ "syscall"
10
11
"github.com/thoj/go-ircevent"
12
"gopkg.in/go-playground/webhooks.v5/github"
@@ -25,6 +25,14 @@ func main() {
25
return
26
}
27
28
+ // IRC auth config
29
+ if _, use := os.LookupEnv("IRC_SASL"); use {
30
+ conn.UseSASL = true
31
+ conn.SASLLogin = os.Getenv("IRC_USER")
32
+ conn.SASLPassword = os.Getenv("IRC_PASS")
33
+ conn.SASLMech = "PLAIN"
34
+ }
35
+
36
// IRC startup
37
conn.QuitMessage = "I've probably crashed..."
38
conn.UseTLS = true
@@ -90,5 +98,6 @@ func main() {
90
98
// Shut down
91
99
<-done
92
100
log.Println("exiting")
101
+ conn.Privmsg(channel, "I'm going away now")
93
102
conn.Quit()
94
103
0 commit comments