mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 17:30:26 +00:00
Strip irc colors correct, strip also ctrl chars (irc). Closes #286
This commit is contained in:
parent
76aafe1fa8
commit
299b71d982
@ -288,7 +288,9 @@ func (b *Birc) handlePrivMsg(event *irc.Event) {
|
|||||||
}
|
}
|
||||||
msg += event.Message()
|
msg += event.Message()
|
||||||
// strip IRC colors
|
// strip IRC colors
|
||||||
re := regexp.MustCompile(`[[:cntrl:]](\d+,|)\d+`)
|
re := regexp.MustCompile(`\x03(\d+,|)\d+`)
|
||||||
|
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
Block a user