mirror of https://github.com/fluffle/goirc
Merge pull request #81 from stapelberg/patch-1
README: add SSLConfig to make connecting work
This commit is contained in:
commit
6277eb6e2d
|
@ -19,6 +19,7 @@ Synopsis:
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
irc "github.com/fluffle/goirc/client"
|
irc "github.com/fluffle/goirc/client"
|
||||||
|
@ -31,6 +32,7 @@ Synopsis:
|
||||||
// Or, create a config and fiddle with it first:
|
// Or, create a config and fiddle with it first:
|
||||||
cfg := irc.NewConfig("nick")
|
cfg := irc.NewConfig("nick")
|
||||||
cfg.SSL = true
|
cfg.SSL = true
|
||||||
|
cfg.SSLConfig = &tls.Config{ServerName: "irc.freenode.net"}
|
||||||
cfg.Server = "irc.freenode.net:7000"
|
cfg.Server = "irc.freenode.net:7000"
|
||||||
cfg.NewNick = func(n string) string { return n + "^" }
|
cfg.NewNick = func(n string) string { return n + "^" }
|
||||||
c = irc.Client(cfg)
|
c = irc.Client(cfg)
|
||||||
|
|
Loading…
Reference in New Issue