5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-24 16:41:36 +00:00

Merge pull request #8 from daysofwineandroses/master

Add PASS support as per RFC1459
This commit is contained in:
@42wim 2016-01-29 00:45:01 +01:00
commit 304dc2e25f
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ type Config struct {
Server string
Port int
Nick string
Password string
Channel string
}
Mattermost struct {

View File

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