From 8ae59176596601278bf368b9fd2622e4fdf51794 Mon Sep 17 00:00:00 2001 From: Qais Patankar Date: Sun, 9 Feb 2020 21:10:18 +0000 Subject: Be less lossy when throttling IRC messages (#1004) Note that msg.Text and chucking it through a chan is OK: https://play.golang.org/p/MTfT3YSsgPX --- bridge/irc/irc.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bridge') diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index ddc90b57..bae9aef0 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -167,12 +167,8 @@ func (b *Birc) Send(msg config.Message) (string, error) { return "", nil } - b.Local <- config.Message{ - Text: msgLines[i], - Username: msg.Username, - Channel: msg.Channel, - Event: msg.Event, - } + msg.Text = msgLines[i] + b.Local <- msg } return "", nil } -- cgit v1.2.3