diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/outmessage-irccolors.tengo | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/outmessage-irccolors.tengo b/contrib/outmessage-irccolors.tengo new file mode 100644 index 00000000..fe63da43 --- /dev/null +++ b/contrib/outmessage-irccolors.tengo @@ -0,0 +1,7 @@ +// See https://github.com/42wim/matterbridge/issues/798 + +// if we're not sending to an irc bridge we strip the IRC colors +if outProtocol != "irc" { + re := text.re_compile(`\x03(?:\d{1,2}(?:,\d{1,2})?)?|[[:cntrl:]]`) + msgText=re.replace(msgText,"") +} |