Hi, so for my matchmaking, it’s possible for the player to create a private server, where they can enter in a code and players that type in that code can join their server. I assume the code needs to use Roblox’s string filtration system, so I’m trying to figure out how I can see if the message has been filtered at all after I call the method on it, and if it has been filtered, I can send a response back to the client attempting to create the server with a message like “Your code was moderated, please try a new code.” Or something among those lines.
If you don’t display the code anywhere, then there is no need for it to be filtered. If you still wish to filter the code, you can check if the string was filtered by checking if it contains a hashtag (#).
It’s better to compare the filtered string and the unfiltered string. If there’s a difference, the string was filtered. Just checking for hashtags will result in all strings legitimately containing hashtags to be falsely deemed as filtered.
Do you guys think it’d need to be a requirement to even do this? Basically what happens is players have the ability to create their own servers with unique codes. Only they’ll be able to see what code they’ve selected, but that code would be stored on the server and active for other users to join.
Nonetheless, I did just change my system to filter the given code, but for whatever reason, it literally didn’t filter anything out. I had to put in an explicit message to see if it worked, and it did nothing…
Regardless of the code being visible to other players, any text a player can enter, even only visible to themselves (which I can’t understand why), has to be ran through the filter. The game is at risk of moderation otherwise.
This is circumstantial and not a catch-all case. Text only visible to the client who wrote it does not need to be filtered. However, if you intend to have that text displayed to other users or saved at some point and then displayed in another session, it must be filtered before being sent to the client, even if they were the one who wrote it.
Edit: Handy little chart I drew up regarding this scenario.