forked from jshiffer/matterbridge
Fix IRC colors regexp
This commit is contained in:
parent
1d240140c9
commit
e8a2e1af63
@ -160,7 +160,7 @@ 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(`[[:cntrl:]](\d+,|)\d+`)
|
||||||
msg = re.ReplaceAllString(msg, "")
|
msg = re.ReplaceAllString(msg, "")
|
||||||
flog.Debugf("Sending message from %s on %s to gateway", event.Arguments[0], b.FullOrigin())
|
flog.Debugf("Sending message from %s on %s to gateway", event.Arguments[0], b.FullOrigin())
|
||||||
b.Remote <- config.Message{Username: event.Nick, Text: msg, Channel: event.Arguments[0], Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
|
b.Remote <- config.Message{Username: event.Nick, Text: msg, Channel: event.Arguments[0], Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}
|
||||||
|
Loading…
Reference in New Issue
Block a user