Fix SSL verification

This commit is contained in:
2016-10-15 00:20:34 +01:00
parent 8a5cfde134
commit cad4334063

View File

@@ -2,9 +2,11 @@ package main
import (
"context"
"crypto/tls"
"flag"
"log"
"math/rand"
"net"
"strings"
"time"
@@ -39,6 +41,17 @@ func main() {
config.Server = *host
config.Pass = *nickserv
config.SSL = *ssl
if config.SSL {
hostname, _, err := net.SplitHostPort(config.Server)
if err != nil {
log.Fatal(err)
}
config.SSLConfig = &tls.Config{
ServerName: hostname,
}
}
adapter := irc.New(config, channelList...)
db, err := quotedb.New(*quotes)