aboutsummaryrefslogtreecommitdiff
path: root/irc.go
diff options
context:
space:
mode:
Diffstat (limited to 'irc.go')
-rw-r--r--irc.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/irc.go b/irc.go
index 06cb813..2577860 100644
--- a/irc.go
+++ b/irc.go
@@ -3,6 +3,7 @@ package main
import (
"crypto/tls"
"fmt"
+ "net"
irc "go.lindenii.runxiyu.org/lindenii-irc"
)
@@ -18,7 +19,13 @@ type errorBack[T any] struct {
}
func ircBotSession() error {
- underlyingConn, err := tls.Dial(ircNet, ircAddr, nil)
+ var err error
+ var underlyingConn net.Conn
+ if ircTLS {
+ underlyingConn, err = tls.Dial(ircNet, ircAddr, nil)
+ } else {
+ underlyingConn, err = net.Dial(ircNet, ircAddr)
+ }
if err != nil {
return err
}