Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 4d68158568567ea8200edc2901a4df23c36924ee Author: Wim <wim@42.be> Date: Sat Feb 16 17:24:04 2019 +0000 Upgrade to latest girc version (irc) (#718) diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go index c94ea89..ce4f044 100644 --- a/bridge/irc/handlers.go +++ b/bridge/irc/handlers.go @@ -817 +817 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) {   return   }   if event.Command == "QUIT" { - if event.Source.Name == b.Nick && strings.Contains(event.Trailing, "Ping timeout") { + if event.Source.Name == b.Nick && strings.Contains(event.Last(), "Ping timeout") {   b.Log.Infof("%s reconnecting ..", b.Account)   b.Remote <- config.Message{Username: "system", Text: "reconnect", Channel: channel, Account: b.Account, Event: config.EventFailure}   return @@ -1647 +1647 @@ func (b *Birc) handlePrivMsg(client *girc.Client, event girc.Event) {   return   }   rmsg := config.Message{Username: event.Source.Name, Channel: strings.ToLower(event.Params[0]), Account: b.Account, UserID: event.Source.Ident + "@" + event.Source.Host} - b.Log.Debugf("== Receiving PRIVMSG: %s %s %#v", event.Source.Name, event.Trailing, event) + b.Log.Debugf("== Receiving PRIVMSG: %s %s %#v", event.Source.Name, event.Last(), event)     // set action event   if event.IsAction() { diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 4e3d3ed..4b7203c 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -2957 +2957 @@ func (b *Birc) storeNames(client *girc.Client, event girc.Event) {   channel := event.Params[2]   b.names[channel] = append(   b.names[channel], - strings.Split(strings.TrimSpace(event.Trailing), " ")...) + strings.Split(strings.TrimSpace(event.Last()), " ")...)  }    func (b *Birc) formatnicks(nicks []string) string { diff --git a/go.mod b/go.mod index f509a28..15fbb83 100644 --- a/go.mod +++ b/go.mod @@ -227 +227 @@ require (   github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 // indirect   github.com/kr/pretty v0.1.0 // indirect   github.com/labstack/echo/v4 v4.0.0 - github.com/lrstanley/girc v0.0.0-20190102153329-c1e59a02f488 + github.com/lrstanley/girc v0.0.0-20190210212025-51b8e096d398   github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 // indirect   github.com/lusis/slack-test v0.0.0-20180109053238-3c758769bfa6 // indirect   github.com/matterbridge/Rocket.Chat.Go.SDK v0.0.0-20190210153444-cc9d05784d5d diff --git a/go.sum b/go.sum index ab184a0..4df46c7 100644 --- a/go.sum +++ b/go.sum @@ -628 +628 @@ github.com/labstack/echo/v4 v4.0.0 h1:q1GH+caIXPP7H2StPIdzy/ez9CO0EepqYeUg6vi9SW  github.com/labstack/echo/v4 v4.0.0/go.mod h1:tZv7nai5buKSg5h/8E6zz4LsD/Dqh9/91Mvs7Z5Zyno=  github.com/labstack/gommon v0.2.8 h1:JvRqmeZcfrHC5u6uVleB4NxxNbzx6gpbJiQknDbKQu0=  github.com/labstack/gommon v0.2.8/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4= -github.com/lrstanley/girc v0.0.0-20190102153329-c1e59a02f488 h1:dDEQN5oaa0WOzEiPDSbOugW/e2I/SWY98HYRdcwmGfY= -github.com/lrstanley/girc v0.0.0-20190102153329-c1e59a02f488/go.mod h1:7cRs1SIBfKQ7e3Tam6GKTILSNHzR862JD0JpINaZoJk= +github.com/lrstanley/girc v0.0.0-20190210212025-51b8e096d398 h1:a40kRmhA1p2XFJ6gqXfCExSyuDDCp/U9LA8ZY27u2Lk= +github.com/lrstanley/girc v0.0.0-20190210212025-51b8e096d398/go.mod h1:7cRs1SIBfKQ7e3Tam6GKTILSNHzR862JD0JpINaZoJk=  github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 h1:AsEBgzv3DhuYHI/GiQh2HxvTP71HCCE9E/tzGUzGdtU=  github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5/go.mod h1:c2mYKRyMb1BPkO5St0c/ps62L4S0W2NAkaTXj9qEI+0=  github.com/lusis/slack-test v0.0.0-20180109053238-3c758769bfa6 h1:iOAVXzZyXtW408TMYejlUPo6BIn92HmOacWtIfNyYns=