I am currently working on a game in where users can share code that can then be run by other players in differents servers, however I came across an issue when deciding how to filter. I already filter the original code block, however some users might combine two strings in order to spell out inappropriate words.
I have thought about possibly filtering all of the output, but the problem with that is the user who originally created the code is likely not to be in-game. So the major question I have is, would the player running the code (the player I put into the fromPlayer field when filtering) be punished if the code creator was to output inappropriate strings. And if so, what other solutions could I use?