Concept to filter chat profanity client side, toggleable (default is on) in settings -> Network / lobby.
The "bad words" list needs some reviewing if it would be used. Right now it's just to show proof of concept.
Then there is also the choice to only filter whole words, or just to filter anywhere it can find a match to a curse word.
example word: "scrap" - containing "crap"
result with the former -> "scrap"
result with the latter -> "s$#@%!"
However, with the former you can chain words to bypass profanity check like "crapcrap". But with the latter theres a large chance it will filter false positives. Theres probably a smarter way about this than i'm doing.