summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-07-21 23:47:44 +0200
committerWim <wim@42.be>2016-07-21 23:47:44 +0200
commit79ffb76f6e87fde36bee3e4bd43d7d5145ba3c67 (patch)
treebc5f5c332b82fbea4fa5c7f6f5ca1e3658054ebb /bridge
parent5fe4b749cfb56ca5f499abaaba76e0292e1d04fa (diff)
downloadmatterbridge-msglm-79ffb76f6e87fde36bee3e4bd43d7d5145ba3c67.tar.gz
matterbridge-msglm-79ffb76f6e87fde36bee3e4bd43d7d5145ba3c67.tar.bz2
matterbridge-msglm-79ffb76f6e87fde36bee3e4bd43d7d5145ba3c67.zip
Add (PLAIN) SASL support
Diffstat (limited to 'bridge')
-rw-r--r--bridge/bridge.go3
-rw-r--r--bridge/config.go1
2 files changed, 4 insertions, 0 deletions
diff --git a/bridge/bridge.go b/bridge/bridge.go
index 406e4687..034aed6f 100644
--- a/bridge/bridge.go
+++ b/bridge/bridge.go
@@ -108,6 +108,9 @@ func NewBridge(name string, config *Config, kind string) *Bridge {
func (b *Bridge) createIRC(name string) *irc.Connection {
i := irc.IRC(b.Config.IRC.Nick, b.Config.IRC.Nick)
i.UseTLS = b.Config.IRC.UseTLS
+ i.UseSASL = b.Config.IRC.UseSASL
+ i.SASLLogin = b.Config.IRC.NickServNick
+ i.SASLPassword = b.Config.IRC.NickServPassword
i.TLSConfig = &tls.Config{InsecureSkipVerify: b.Config.IRC.SkipTLSVerify}
if b.Config.IRC.Password != "" {
i.Password = b.Config.IRC.Password
diff --git a/bridge/config.go b/bridge/config.go
index 1daa04d8..3750a1a0 100644
--- a/bridge/config.go
+++ b/bridge/config.go
@@ -9,6 +9,7 @@ import (
type Config struct {
IRC struct {
UseTLS bool
+ UseSASL bool
SkipTLSVerify bool
Server string
Nick string