summaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/lrstanley/girc/README.md16
-rw-r--r--vendor/github.com/lrstanley/girc/builtin.go2
-rw-r--r--vendor/github.com/lrstanley/girc/cap.go2
-rw-r--r--vendor/github.com/lrstanley/girc/cap_sasl.go1
-rw-r--r--vendor/github.com/lrstanley/girc/conn.go10
-rw-r--r--vendor/github.com/lrstanley/girc/constants.go1
-rw-r--r--vendor/github.com/lrstanley/girc/event.go4
-rw-r--r--vendor/github.com/lrstanley/girc/handler.go1
8 files changed, 14 insertions, 23 deletions
diff --git a/vendor/github.com/lrstanley/girc/README.md b/vendor/github.com/lrstanley/girc/README.md
index 35f3d818..62f26a76 100644
--- a/vendor/github.com/lrstanley/girc/README.md
+++ b/vendor/github.com/lrstanley/girc/README.md
@@ -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.)
diff --git a/vendor/github.com/lrstanley/girc/builtin.go b/vendor/github.com/lrstanley/girc/builtin.go
index 081e9465..914b5fab 100644
--- a/vendor/github.com/lrstanley/girc/builtin.go
+++ b/vendor/github.com/lrstanley/girc/builtin.go
@@ -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++ {
diff --git a/vendor/github.com/lrstanley/girc/cap.go b/vendor/github.com/lrstanley/girc/cap.go
index 38ff210c..dcf53f0e 100644
--- a/vendor/github.com/lrstanley/girc/cap.go
+++ b/vendor/github.com/lrstanley/girc/cap.go
@@ -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:]
}
}
}
diff --git a/vendor/github.com/lrstanley/girc/cap_sasl.go b/vendor/github.com/lrstanley/girc/cap_sasl.go
index 9aecccf3..d880316b 100644
--- a/vendor/github.com/lrstanley/girc/cap_sasl.go
+++ b/vendor/github.com/lrstanley/girc/cap_sasl.go
@@ -120,7 +120,6 @@ func handleSASL(c *Client, e Event) {
break
}
}
- return
}
func handleSASLError(c *Client, e Event) {
diff --git a/vendor/github.com/lrstanley/girc/conn.go b/vendor/github.com/lrstanley/girc/conn.go
index 441c3e71..b691403c 100644
--- a/vendor/github.com/lrstanley/girc/conn.go
+++ b/vendor/github.com/lrstanley/girc/conn.go
@@ -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()
diff --git a/vendor/github.com/lrstanley/girc/constants.go b/vendor/github.com/lrstanley/girc/constants.go
index a190ef21..8f5f91b1 100644
--- a/vendor/github.com/lrstanley/girc/constants.go
+++ b/vendor/github.com/lrstanley/girc/constants.go
@@ -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"
)
diff --git a/vendor/github.com/lrstanley/girc/event.go b/vendor/github.com/lrstanley/girc/event.go
index 423e452b..3eb187f9 100644
--- a/vendor/github.com/lrstanley/girc/event.go
+++ b/vendor/github.com/lrstanley/girc/event.go
@@ -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
}
diff --git a/vendor/github.com/lrstanley/girc/handler.go b/vendor/github.com/lrstanley/girc/handler.go
index 4832262a..712886b3 100644
--- a/vendor/github.com/lrstanley/girc/handler.go
+++ b/vendor/github.com/lrstanley/girc/handler.go
@@ -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