summaryrefslogtreecommitdiffstats
path: root/bridge/irc
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-02-16 17:24:04 +0100
committerGitHub <noreply@github.com>2019-02-16 17:24:04 +0100
commit312369586925e0419271df7466e9b40756738f89 (patch)
tree247b181b64cd589afa3ab865058f47d26db662ea /bridge/irc
parent777af73e2bafc0b2c6e1d1eaa554106efec36a70 (diff)
downloadmatterbridge-msglm-312369586925e0419271df7466e9b40756738f89.tar.gz
matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.tar.bz2
matterbridge-msglm-312369586925e0419271df7466e9b40756738f89.zip
Upgrade to latest girc version (irc) (#718)
Diffstat (limited to 'bridge/irc')
-rw-r--r--bridge/irc/handlers.go4
-rw-r--r--bridge/irc/irc.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go
index c94ea892..ce4f0445 100644
--- a/bridge/irc/handlers.go
+++ b/bridge/irc/handlers.go
@@ -81,7 +81,7 @@ 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
@@ -164,7 +164,7 @@ 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 4e3d3ed4..4b7203c4 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -295,7 +295,7 @@ 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 {