From e52b040b9c4d3346f29817f63295a95d0d1ebd15 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 1 Oct 2016 20:07:59 +0200 Subject: Add more irc debug on connect (when debugging enabled) --- bridge/irc/irc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index c6ef70e7..833fd569 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -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 } -- cgit v1.2.3