irc: handle the draft/relaymsg tag in spoofed messages too

This commit is contained in:
James Lu
2020-12-20 23:41:30 +00:00
parent 436eb578aa
commit 9241f901c1

View File

@@ -343,6 +343,11 @@ func (b *Birc) skipPrivMsg(event girc.Event) bool {
return true
}
// don't forward messages we sent via RELAYMSG
if relayedNick, ok := event.Tags.Get("draft/relaymsg"); ok && relayedNick == b.Nick {
return true
}
// This is the old name of the cap sent in spoofed messages; I've kept this in
// for compatibility reasons
if relayedNick, ok := event.Tags.Get("relaymsg"); ok && relayedNick == b.Nick {
return true
}