summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-10-20 00:33:15 +0200
committerGitHub <noreply@github.com>2020-10-20 00:33:15 +0200
commit61569a8610206a04a7a139924e6d135de8c4fdf3 (patch)
tree53c36c5ce6be4f03118f3cfd7ba160dfd84dd37e /bridge
parent075a84427f6332aab707d283ad770d69f8816032 (diff)
downloadmatterbridge-msglm-61569a8610206a04a7a139924e6d135de8c4fdf3.tar.gz
matterbridge-msglm-61569a8610206a04a7a139924e6d135de8c4fdf3.tar.bz2
matterbridge-msglm-61569a8610206a04a7a139924e6d135de8c4fdf3.zip
Add even more debug for irc (#1266)
Diffstat (limited to 'bridge')
-rw-r--r--bridge/irc/irc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 6db062ce..2ac678e0 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -4,6 +4,7 @@ import (
"crypto/tls"
"fmt"
"hash/crc32"
+ "io/ioutil"
"net"
"sort"
"strconv"
@@ -240,6 +241,11 @@ 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"),
@@ -252,6 +258,7 @@ 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
}