Avoid directly forwarding NOTICE messages

This would forward tags even if downstream doesn't support those.
This commit is contained in:
Simon Ser 2020-03-31 19:41:12 +02:00
parent cbadb64748
commit 29a42203b6
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -310,7 +310,10 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
if msg.Prefix.User == "" && msg.Prefix.Host == "" { // server message
uc.forEachDownstream(func(dc *downstreamConn) {
dc.SendMessage(msg)
dc.SendMessage(&irc.Message{
Command: "NOTICE",
Params: msg.Params,
})
})
} else { // regular user NOTICE
var nick, text string