diff options
author | Wim <wim@42.be> | 2017-10-28 14:28:15 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-10-28 14:28:15 +0200 |
commit | b7a8c6b60fbb9c26db7b427bcf95332efc697ba7 (patch) | |
tree | 2dfd557302149956405fe47b3e3f75e3c46cf52a /bridge/irc | |
parent | 41aa8ad7994075a72aebb2ce14d62a00bef022d7 (diff) | |
download | matterbridge-msglm-b7a8c6b60fbb9c26db7b427bcf95332efc697ba7.tar.gz matterbridge-msglm-b7a8c6b60fbb9c26db7b427bcf95332efc697ba7.tar.bz2 matterbridge-msglm-b7a8c6b60fbb9c26db7b427bcf95332efc697ba7.zip |
Try again to strip colors correct. #286
Diffstat (limited to 'bridge/irc')
-rw-r--r-- | bridge/irc/irc.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 2c8c09a4..e4fc0680 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -288,9 +288,7 @@ func (b *Birc) handlePrivMsg(event *irc.Event) { } msg += event.Message() // strip IRC colors - re := regexp.MustCompile(`\x03(\d+,|)\d+`) - msg = re.ReplaceAllString(msg, "") - re = regexp.MustCompile(`[[:cntrl:]]`) + re := regexp.MustCompile(`[[:cntrl:]](?:\d{1,2}(?:,\d{1,2})?)?`) msg = re.ReplaceAllString(msg, "") var r io.Reader |