mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 09:20:27 +00:00
Add even more debug for irc (#1266)
This commit is contained in:
parent
075a84427f
commit
61569a8610
@ -4,6 +4,7 @@ import (
|
|||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"fmt"
|
"fmt"
|
||||||
"hash/crc32"
|
"hash/crc32"
|
||||||
|
"io/ioutil"
|
||||||
"net"
|
"net"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -240,6 +241,11 @@ func (b *Birc) getClient() (*girc.Client, error) {
|
|||||||
user = user[1:]
|
user = user[1:]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug := ioutil.Discard
|
||||||
|
if b.GetInt("DebugLevel") == 2 {
|
||||||
|
debug = b.Log.Writer()
|
||||||
|
}
|
||||||
|
|
||||||
i := girc.New(girc.Config{
|
i := girc.New(girc.Config{
|
||||||
Server: server,
|
Server: server,
|
||||||
ServerPass: b.GetString("Password"),
|
ServerPass: b.GetString("Password"),
|
||||||
@ -252,6 +258,7 @@ func (b *Birc) getClient() (*girc.Client, error) {
|
|||||||
PingDelay: time.Minute,
|
PingDelay: time.Minute,
|
||||||
// skip gIRC internal rate limiting, since we have our own throttling
|
// skip gIRC internal rate limiting, since we have our own throttling
|
||||||
AllowFlood: true,
|
AllowFlood: true,
|
||||||
|
Debug: debug,
|
||||||
})
|
})
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user