Try again to strip colors correct. #286
This commit is contained in:
parent
41aa8ad799
commit
b7a8c6b60f
|
@ -288,9 +288,7 @@ func (b *Birc) handlePrivMsg(event *irc.Event) {
|
||||||
}
|
}
|
||||||
msg += event.Message()
|
msg += event.Message()
|
||||||
// strip IRC colors
|
// strip IRC colors
|
||||||
re := regexp.MustCompile(`\x03(\d+,|)\d+`)
|
re := regexp.MustCompile(`[[:cntrl:]](?:\d{1,2}(?:,\d{1,2})?)?`)
|
||||||
msg = re.ReplaceAllString(msg, "")
|
|
||||||
re = regexp.MustCompile(`[[:cntrl:]]`)
|
|
||||||
msg = re.ReplaceAllString(msg, "")
|
msg = re.ReplaceAllString(msg, "")
|
||||||
|
|
||||||
var r io.Reader
|
var r io.Reader
|
||||||
|
|
Loading…
Reference in New Issue