Make the SSL config app-configurable
This commit is contained in:
parent
b62f72a746
commit
52c17040d5
2
irc.go
2
irc.go
@ -200,7 +200,7 @@ func (i *IRCConnection) ConnectSSL(server string) error {
|
||||
i.server = server
|
||||
fmt.Printf("Connecting to %s over SSL\n", i.server)
|
||||
var err error
|
||||
i.socket, err = tls.Dial("tcp", i.server, nil)
|
||||
i.socket, err = tls.Dial("tcp", i.server, i.SSLConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ package irc
|
||||
import (
|
||||
"net"
|
||||
"time"
|
||||
"crypto/tls"
|
||||
)
|
||||
|
||||
type IRCConnection struct {
|
||||
@ -29,6 +30,8 @@ type IRCConnection struct {
|
||||
VerboseCallbackHandler bool
|
||||
|
||||
quitting bool
|
||||
|
||||
SSLConfig *tls.Config
|
||||
}
|
||||
|
||||
type IRCEvent struct {
|
||||
|
Loading…
Reference in New Issue
Block a user