From c82438625e56641ab951be5ed425b2fab930ee9d Mon Sep 17 00:00:00 2001 From: delthas Date: Wed, 18 Mar 2020 03:11:38 +0100 Subject: [PATCH] Add upstream INVITE support --- upstream.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/upstream.go b/upstream.go index a84f17f..83ff24b 100644 --- a/upstream.go +++ b/upstream.go @@ -562,6 +562,20 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error { return err } uc.ring.Produce(msg) + case "INVITE": + var nick string + var channel string + if err := parseMessageParams(msg, &nick, &channel); err != nil { + return err + } + + uc.forEachDownstream(func(dc *downstreamConn) { + dc.SendMessage(&irc.Message{ + Prefix: dc.marshalUserPrefix(uc, msg.Prefix), + Command: "INVITE", + Params: []string{dc.marshalNick(uc, nick), dc.marshalChannel(uc, channel)}, + }) + }) case irc.RPL_YOURHOST, irc.RPL_CREATED: // Ignore case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME: