mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-25 07:15:43 +00:00
Merge pull request #8 from daysofwineandroses/master
Add PASS support as per RFC1459
This commit is contained in:
commit
304dc2e25f
@ -13,6 +13,7 @@ type Config struct {
|
||||
Server string
|
||||
Port int
|
||||
Nick string
|
||||
Password string
|
||||
Channel string
|
||||
}
|
||||
Mattermost struct {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user