forked from jshiffer/matterbridge
Update lrstanley/girc dep (#1773)
This commit is contained in:
parent
5d9604cd15
commit
5f75f9886d
2
go.mod
2
go.mod
@ -22,7 +22,7 @@ require (
|
||||
github.com/keybase/go-keybase-chat-bot v0.0.0-20211201215354-ee4b23828b55
|
||||
github.com/kyokomi/emoji/v2 v2.2.9
|
||||
github.com/labstack/echo/v4 v4.7.0
|
||||
github.com/lrstanley/girc v0.0.0-20211023233735-147f0ff77566
|
||||
github.com/lrstanley/girc v0.0.0-20220321215535-9664730c7858
|
||||
github.com/matterbridge/Rocket.Chat.Go.SDK v0.0.0-20211016222428-79310a412696
|
||||
github.com/matterbridge/go-xmpp v0.0.0-20211030125215-791a06c5f1be
|
||||
github.com/matterbridge/gomatrix v0.0.0-20220205235239-607eb9ee6419
|
||||
|
10
go.sum
10
go.sum
@ -1053,8 +1053,8 @@ github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/lrstanley/girc v0.0.0-20211023233735-147f0ff77566 h1:tseAo8DbdhZa+PLuJW0p/P8b7I9LUiVpIpboAHkLsoM=
|
||||
github.com/lrstanley/girc v0.0.0-20211023233735-147f0ff77566/go.mod h1:liX5MxHPrwgHaKowoLkYGwbXfYABh1jbZ6FpElbGF1I=
|
||||
github.com/lrstanley/girc v0.0.0-20220321215535-9664730c7858 h1:IIbHCRHuANbPoQymk4BWGcRI47RXHOt7bDxPbxQ9rms=
|
||||
github.com/lrstanley/girc v0.0.0-20220321215535-9664730c7858/go.mod h1:liX5MxHPrwgHaKowoLkYGwbXfYABh1jbZ6FpElbGF1I=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
@ -1171,12 +1171,12 @@ github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl
|
||||
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
||||
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
||||
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
|
16
vendor/github.com/lrstanley/girc/README.md
generated
vendored
16
vendor/github.com/lrstanley/girc/README.md
generated
vendored
@ -1,26 +1,20 @@
|
||||
<p align="center"><a href="https://godoc.org/github.com/lrstanley/girc"><img width="270" src="http://i.imgur.com/DEnyrdB.png"></a></p>
|
||||
<p align="center"><a href="https://pkg.go.dev/github.com/lrstanley/girc"><img width="270" src="http://i.imgur.com/DEnyrdB.png"></a></p>
|
||||
<p align="center">girc, a flexible IRC library for Go</p>
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/lrstanley/girc"><img src="https://travis-ci.org/lrstanley/girc.svg?branch=master" alt="Build Status"></a>
|
||||
<a href="https://github.com/lrstanley/girc/actions"><img src="https://github.com/lrstanley/girc/workflows/test/badge.svg" alt="Test Status"></a>
|
||||
<a href="https://codecov.io/gh/lrstanley/girc"><img src="https://codecov.io/gh/lrstanley/girc/branch/master/graph/badge.svg" alt="Coverage Status"></a>
|
||||
<a href="https://godoc.org/github.com/lrstanley/girc"><img src="https://godoc.org/github.com/lrstanley/girc?status.png" alt="GoDoc"></a>
|
||||
<a href="https://pkg.go.dev/github.com/lrstanley/girc"><img src="https://pkg.go.dev/badge/github.com/lrstanley/girc" alt="GoDoc"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/lrstanley/girc"><img src="https://goreportcard.com/badge/github.com/lrstanley/girc" alt="Go Report Card"></a>
|
||||
<a href="https://byteirc.org/channel/%23%2Fdev%2Fnull"><img src="https://img.shields.io/badge/ByteIRC-%23%2Fdev%2Fnull-blue.svg" alt="IRC Chat"></a>
|
||||
<a href="https://liam.sh/chat"><img src="https://img.shields.io/badge/community-chat%20with%20us-green.svg" alt="Community Chat"></a>
|
||||
</p>
|
||||
|
||||
## Status
|
||||
|
||||
**girc is fairly close to marking the 1.0.0 endpoint, which will be tagged as
|
||||
necessary, so you will be able to use this with care knowing the specific tag
|
||||
you're using won't have breaking changes**
|
||||
|
||||
## Features
|
||||
|
||||
- Focuses on simplicity, yet tries to still be flexible.
|
||||
- Only requires [standard library packages](https://godoc.org/github.com/lrstanley/girc?imports)
|
||||
- Event based triggering/responses ([example](https://godoc.org/github.com/lrstanley/girc#ex-package--Commands), and [CTCP too](https://godoc.org/github.com/lrstanley/girc#Commands.SendCTCP)!)
|
||||
- [Documentation](https://godoc.org/github.com/lrstanley/girc) is _mostly_ complete.
|
||||
- Support for almost all of the [IRCv3 spec](http://ircv3.net/software/libraries.html).
|
||||
- Support for a good portion of the [IRCv3 spec](http://ircv3.net/software/libraries.html).
|
||||
- SASL Auth (currently only `PLAIN` and `EXTERNAL` is support by default,
|
||||
however you can simply implement `SASLMech` yourself to support additional
|
||||
mechanisms.)
|
||||
|
2
vendor/github.com/lrstanley/girc/builtin.go
generated
vendored
2
vendor/github.com/lrstanley/girc/builtin.go
generated
vendored
@ -451,7 +451,7 @@ func handleNAMES(c *Client, e Event) {
|
||||
|
||||
var modes, nick string
|
||||
var ok bool
|
||||
s := &Source{}
|
||||
var s *Source
|
||||
|
||||
c.state.Lock()
|
||||
for i := 0; i < len(parts); i++ {
|
||||
|
2
vendor/github.com/lrstanley/girc/cap.go
generated
vendored
2
vendor/github.com/lrstanley/girc/cap.go
generated
vendored
@ -106,7 +106,7 @@ func parseCap(raw string) map[string]map[string]string {
|
||||
if j < 0 {
|
||||
out[parts[i][:val]][option] = ""
|
||||
} else {
|
||||
out[parts[i][:val]][option[:j]] = option[j+1 : len(option)]
|
||||
out[parts[i][:val]][option[:j]] = option[j+1:]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
vendor/github.com/lrstanley/girc/cap_sasl.go
generated
vendored
1
vendor/github.com/lrstanley/girc/cap_sasl.go
generated
vendored
@ -120,7 +120,6 @@ func handleSASL(c *Client, e Event) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func handleSASLError(c *Client, e Event) {
|
||||
|
10
vendor/github.com/lrstanley/girc/conn.go
generated
vendored
10
vendor/github.com/lrstanley/girc/conn.go
generated
vendored
@ -43,8 +43,7 @@ type ircConn struct {
|
||||
lastPing time.Time
|
||||
// lastPong is the last successful time that we pinged the server and
|
||||
// received a successful pong back.
|
||||
lastPong time.Time
|
||||
pingDelay time.Duration
|
||||
lastPong time.Time
|
||||
}
|
||||
|
||||
// Dialer is an interface implementation of net.Dialer. Use this if you would
|
||||
@ -477,7 +476,7 @@ func (c *Client) write(event *Event) {
|
||||
func (c *ircConn) rate(chars int) time.Duration {
|
||||
_time := time.Second + ((time.Duration(chars) * time.Second) / 100)
|
||||
|
||||
if c.writeDelay += _time - time.Now().Sub(c.lastWrite); c.writeDelay < 0 {
|
||||
if c.writeDelay += _time - time.Since(c.lastWrite); c.writeDelay < 0 {
|
||||
c.writeDelay = 0
|
||||
}
|
||||
|
||||
@ -607,15 +606,16 @@ func (c *Client) pingLoop(ctx context.Context, errs chan error, wg *sync.WaitGro
|
||||
if time.Since(c.conn.lastPong) > c.Config.PingDelay+(60*time.Second) {
|
||||
// It's 60 seconds over what out ping delay is, connection
|
||||
// has probably dropped.
|
||||
errs <- ErrTimedOut{
|
||||
err := ErrTimedOut{
|
||||
TimeSinceSuccess: time.Since(c.conn.lastPong),
|
||||
LastPong: c.conn.lastPong,
|
||||
LastPing: c.conn.lastPing,
|
||||
Delay: c.Config.PingDelay,
|
||||
}
|
||||
|
||||
wg.Done()
|
||||
c.conn.mu.RUnlock()
|
||||
errs <- err
|
||||
wg.Done()
|
||||
return
|
||||
}
|
||||
c.conn.mu.RUnlock()
|
||||
|
1
vendor/github.com/lrstanley/girc/constants.go
generated
vendored
1
vendor/github.com/lrstanley/girc/constants.go
generated
vendored
@ -347,4 +347,5 @@ const (
|
||||
RPL_LOCALUSERS = "265" // aircd/hybrid/bahamut, used on freenode.
|
||||
RPL_TOPICWHOTIME = "333" // ircu, used on freenode.
|
||||
RPL_WHOSPCRPL = "354" // ircu, used on networks with WHOX support.
|
||||
RPL_CREATIONTIME = "329"
|
||||
)
|
||||
|
4
vendor/github.com/lrstanley/girc/event.go
generated
vendored
4
vendor/github.com/lrstanley/girc/event.go
generated
vendored
@ -13,7 +13,7 @@ import (
|
||||
|
||||
const (
|
||||
eventSpace byte = ' ' // Separator.
|
||||
maxLength = 510 // Maximum length is 510 (2 for line endings).
|
||||
maxLength int = 510 // Maximum length is 510 (2 for line endings).
|
||||
)
|
||||
|
||||
// cutCRFunc is used to trim CR characters from prefixes/messages.
|
||||
@ -636,6 +636,4 @@ func (s *Source) writeTo(buffer *bytes.Buffer) {
|
||||
buffer.WriteByte(prefixHost)
|
||||
buffer.WriteString(s.Host)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
1
vendor/github.com/lrstanley/girc/handler.go
generated
vendored
1
vendor/github.com/lrstanley/girc/handler.go
generated
vendored
@ -458,7 +458,6 @@ func recoverHandlerPanic(client *Client, event *Event, id string, skip int) {
|
||||
}
|
||||
|
||||
client.Config.RecoverFunc(client, err)
|
||||
return
|
||||
}
|
||||
|
||||
// HandlerError is the error returned when a panic is intentionally recovered
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -190,7 +190,7 @@ github.com/labstack/gommon/bytes
|
||||
github.com/labstack/gommon/color
|
||||
github.com/labstack/gommon/log
|
||||
github.com/labstack/gommon/random
|
||||
# github.com/lrstanley/girc v0.0.0-20211023233735-147f0ff77566
|
||||
# github.com/lrstanley/girc v0.0.0-20220321215535-9664730c7858
|
||||
## explicit; go 1.12
|
||||
github.com/lrstanley/girc
|
||||
# github.com/magiconair/properties v1.8.5
|
||||
|
Loading…
Reference in New Issue
Block a user