5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-14 03:50:26 +00:00

Fix panic in irc. Closes #1751 (#1760)

This commit is contained in:
Wim 2022-03-12 17:33:39 +01:00 committed by GitHub
parent e4c0ca0f48
commit c30e90ff3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,9 +362,11 @@ func (b *Birc) skipPrivMsg(event girc.Event) bool {
return true return true
} }
// don't forward message from ourself // don't forward message from ourself
if event.Source != nil {
if event.Source.Name == b.Nick { if event.Source.Name == b.Nick {
return true return true
} }
}
// don't forward messages we sent via RELAYMSG // don't forward messages we sent via RELAYMSG
if relayedNick, ok := event.Tags.Get("draft/relaymsg"); ok && relayedNick == b.Nick { if relayedNick, ok := event.Tags.Get("draft/relaymsg"); ok && relayedNick == b.Nick {
return true return true