diff --git a/bridge/steam/steam.go b/bridge/steam/steam.go index 5a577a28..1ca72410 100644 --- a/bridge/steam/steam.go +++ b/bridge/steam/steam.go @@ -4,6 +4,7 @@ import ( "fmt" "sync" "time" + "regexp" "github.com/42wim/matterbridge/bridge" "github.com/42wim/matterbridge/bridge/config" @@ -67,6 +68,10 @@ func (b *Bsteam) Send(msg config.Message) (string, error) { return "", err } + // Strip IRC colors sent to Steam + re := regexp.MustCompile(`\x03(?:\d{1,2}(?:,\d{1,2})?)?|[[:cntrl:]]`) + msg.Text = re.ReplaceAllString(msg.Text, "") + // Handle files if msg.Extra != nil { for _, rmsg := range helper.HandleExtra(&msg, b.General) {