Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 059134016469d075e9792cde6b2c4157c40287ad Author: Wim <wim@42.be> Date: Tue Oct 20 00:33:15 2020 +0000 Add even more debug for irc (#1266) diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 6db062c..2ac678e 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -46 +47 @@ import (   "crypto/tls"   "fmt"   "hash/crc32" + "io/ioutil"   "net"   "sort"   "strconv" @@ -2406 +24111 @@ func (b *Birc) getClient() (*girc.Client, error) {   user = user[1:]   }   + debug := ioutil.Discard + if b.GetInt("DebugLevel") == 2 { + debug = b.Log.Writer() + } +   i := girc.New(girc.Config{   Server: server,   ServerPass: b.GetString("Password"), @@ -2526 +2587 @@ func (b *Birc) getClient() (*girc.Client, error) {   PingDelay: time.Minute,   // skip gIRC internal rate limiting, since we have our own throttling   AllowFlood: true, + Debug: debug,   })   return i, nil  }