diff options
-rw-r--r-- | config.go | 1 | ||||
-rw-r--r-- | matterbridge.go | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -13,6 +13,7 @@ type Config struct { Server string Port int Nick string + Password string Channel string } Mattermost struct { diff --git a/matterbridge.go b/matterbridge.go index 59165dfa..a07ab303 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -41,6 +41,9 @@ 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.TLSConfig = &tls.Config{InsecureSkipVerify: b.Config.IRC.SkipTLSVerify} + if b.Config.IRC.Password != "" { + i.Password = b.Config.IRC.Password + } i.Connect(b.Config.IRC.Server + ":" + strconv.Itoa(b.Config.IRC.Port)) time.Sleep(time.Second) log.Println("Joining", b.Config.IRC.Channel, "as", b.Config.IRC.Nick) |