From 976ae2e649b173bdda918cfb436fcd5aea495c55 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 29 Apr 2020 14:53:48 +0200 Subject: [PATCH] Forward RPL_AWAY messages --- upstream.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/upstream.go b/upstream.go index 1020a99..8cfcccd 100644 --- a/upstream.go +++ b/upstream.go @@ -1133,6 +1133,19 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error { }) }) } + case irc.RPL_AWAY: + var nick, reason string + if err := parseMessageParams(msg, nil, &nick, &reason); err != nil { + return err + } + + uc.forEachDownstreamByID(downstreamID, func(dc *downstreamConn) { + dc.SendMessage(&irc.Message{ + Prefix: dc.srv.prefix(), + Command: irc.RPL_AWAY, + Params: []string{dc.nick, dc.marshalEntity(uc.network, nick), reason}, + }) + }) case "TAGMSG": // TODO: relay to downstream connections that accept message-tags case "ACK":