diff options
author | Wim <wim@42.be> | 2019-02-16 17:24:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-16 17:24:04 +0100 |
commit | 312369586925e0419271df7466e9b40756738f89 (patch) | |
tree | 247b181b64cd589afa3ab865058f47d26db662ea /vendor/github.com/lrstanley/girc/ctcp.go | |
parent | 777af73e2bafc0b2c6e1d1eaa554106efec36a70 (diff) | |
download | matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.tar.gz matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.tar.bz2 matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.zip |
Upgrade to latest girc version (irc) (#718)
Diffstat (limited to 'vendor/github.com/lrstanley/girc/ctcp.go')
-rw-r--r-- | vendor/github.com/lrstanley/girc/ctcp.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/lrstanley/girc/ctcp.go b/vendor/github.com/lrstanley/girc/ctcp.go index 56f4c85c..637615ef 100644 --- a/vendor/github.com/lrstanley/girc/ctcp.go +++ b/vendor/github.com/lrstanley/girc/ctcp.go @@ -41,7 +41,7 @@ func DecodeCTCP(e *Event) *CTCPEvent { // Must be targeting a user/channel, AND trailing must have // DELIM+TAG+DELIM minimum (at least 3 chars). - if len(e.Params) != 1 || len(e.Trailing) < 3 { + if len(e.Params) != 2 || len(e.Params[1]) < 3 { return nil } @@ -49,12 +49,12 @@ func DecodeCTCP(e *Event) *CTCPEvent { return nil } - if e.Trailing[0] != ctcpDelim || e.Trailing[len(e.Trailing)-1] != ctcpDelim { + if e.Params[1][0] != ctcpDelim || e.Params[1][len(e.Params[1])-1] != ctcpDelim { return nil } // Strip delimiters. - text := e.Trailing[1 : len(e.Trailing)-1] + text := e.Params[1][1 : len(e.Params[1])-1] s := strings.IndexByte(text, eventSpace) |