4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-26 07:29:24 +00:00

Add (PLAIN) SASL support

This commit is contained in:
Wim
2016-07-21 23:47:44 +02:00
parent 5fe4b749cf
commit 79ffb76f6e
7 changed files with 47 additions and 13 deletions

View File

@ -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

View File

@ -9,6 +9,7 @@ import (
type Config struct {
IRC struct {
UseTLS bool
UseSASL bool
SkipTLSVerify bool
Server string
Nick string