Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 63e51e5e064604b3894fab75cef7a644800c5254 Author: Wim <wim@42.be> Date: Thu Jul 21 23:47:44 2016 +0000 Add (PLAIN) SASL support diff --git a/bridge/bridge.go b/bridge/bridge.go index 406e468..034aed6 100644 --- a/bridge/bridge.go +++ b/bridge/bridge.go @@ -1086 +1089 @@ 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 1daa04d..3750a1a 100644 --- a/bridge/config.go +++ b/bridge/config.go @@ -96 +97 @@ import (  type Config struct {   IRC struct {   UseTLS bool + UseSASL bool   SkipTLSVerify bool   Server string   Nick string diff --git a/matterbridge.conf.sample b/matterbridge.conf.sample index 8af6fc9..5574653 100644 --- a/matterbridge.conf.sample +++ b/matterbridge.conf.sample @@ -116 +1111 @@ Server="irc.freenode.net:6667"  #OPTIONAL (default false)  UseTLS=false   +#Enable SASL (PLAIN) authentication. (freenode requires this from eg AWS hosts) +#It uses NickServNick and NickServPassword as login and password +#OPTIONAL (deefault false) +UseSASL=false +  #Enable to not verify the certificate on your irc server. i  #e.g. when using selfsigned certificates  #OPTIONAL (default false) @@ -216 +267 @@ SkipTLSVerify=true  Nick="matterbot"    #If you registered your bot with a service like Nickserv on freenode. +#Also being used when UseSASL=true  #OPTIONAL  NickServNick="nickserv"  NickServPassword="secret" diff --git a/matterbridge.go b/matterbridge.go index 29f28b0..4d2c4c0 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -77 +77 @@ import (   log "github.com/Sirupsen/logrus"  )   -var version = "0.5.0-beta1" +var version = "0.5.0-beta2"    func init() {   log.SetFormatter(&log.TextFormatter{FullTimestamp: true})