extract cleanIrcMessage from client to shared
This commit is contained in:
6
shared/irc.ts
Normal file
6
shared/irc.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
const matchFormatting =
|
||||
/\x02|\x1D|\x1F|\x16|\x0F|\x11|\x1E|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi;
|
||||
|
||||
export function cleanIrcMessage(message: string) {
|
||||
return message.replace(matchFormatting, "").trim();
|
||||
}
|
||||
Reference in New Issue
Block a user