Fix SSL verification
This commit is contained in:
13
lysenko.go
13
lysenko.go
@@ -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)
|
||||
|
Reference in New Issue
Block a user