summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-01-23 18:54:33 +0100
committerDimitri Sokolyuk <demon@dim13.org>2018-01-23 18:54:33 +0100
commit99a1001af63254be49ad303c50271b2e07671518 (patch)
tree814741eb19ce02a4c366cab3940f41e5f40bac0f
parente5e797739359de55314b3579f8750c8efec2a001 (diff)
Add ServerName
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index 59295d1..8cef1ac 100644
--- a/main.go
+++ b/main.go
@@ -1,6 +1,7 @@
package main
import (
+ "crypto/tls"
"flag"
"fmt"
"log"
@@ -107,7 +108,10 @@ func main() {
conf := irc.NewConfig(*name)
conf.Server = *node
- conf.SSL = !*notls
+ if !*notls {
+ conf.SSL = true
+ conf.SSLConfig = &tls.Config{ServerName: *node}
+ }
conn := irc.Client(conf)
done := make(chan struct{})