Forward RPL_AWAY messages

This commit is contained in:
Simon Ser 2020-04-29 14:53:48 +02:00
parent 6899e748c6
commit 976ae2e649
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -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": case "TAGMSG":
// TODO: relay to downstream connections that accept message-tags // TODO: relay to downstream connections that accept message-tags
case "ACK": case "ACK":