5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 05:50:28 +00:00

Add more irc debug on connect (when debugging enabled)

This commit is contained in:
Wim 2016-10-01 20:07:59 +02:00
parent 1accee1653
commit e52b040b9c

View File

@ -52,6 +52,9 @@ func (b *Birc) Command(msg *config.Message) string {
func (b *Birc) Connect() error {
flog.Infof("Connecting %s", b.Config.Server)
i := irc.IRC(b.Config.Nick, b.Config.Nick)
if log.GetLevel() == log.DebugLevel {
i.Debug = true
}
i.UseTLS = b.Config.UseTLS
i.UseSASL = b.Config.UseSASL
i.SASLLogin = b.Config.NickServNick
@ -66,6 +69,7 @@ func (b *Birc) Connect() error {
return err
}
flog.Info("Connection succeeded")
i.Debug = false
b.i = i
return nil
}