Can I write a list of swears to check if someone is using derogatory terms?

Hello, I am coding a low-level game where you guess digits of pi, and I want to write words that if the username has, it stops you from proceeding (The reason is because I have a leaderboard), is this allowed or would I be kicked/banned?

1 Like

Hey @Andrii-JrJr welcome to the forums!

This is allowed. Even other site mods have done this

6 Likes

@Andrii-JrJr Got some more info and you cant publish it to the community with this unfortently.

3 Likes

Didn’t @IroncladDev do a profanity list on Replyte, which was published?

2 Likes

Yes, I also got more info. It is allowed if the swears are in secrets. Thats how Ironclad did it
image

5 Likes

Is it okay if they’re stored in a database (so moderators can add more while it’s running, in case a spammer joins)? Would they need to be encrypted in that case?

2 Likes

I think Replit would prevent creating accounts with inappropriate usernames, but I’m not sure.

1 Like

OP may not be using Replit Auth.

1 Like

In that case, could they (ab)use OpenAI’s moderation API endpoint for making sure usernames are appropriate?

3 Likes

If that’s the case, I hope they’re using a good password hashing algorithm and storing passwords responsibly.

1 Like

It’s okay to have a list of swears in your code in a published Repl, but at the bare minimum, maybe make it hard for people to read.

If you encode the swears in base64, reverse them, or stick a bunch of random characters between them for future reference in your code, that’d be awesome.

4 Likes

No they don’t. That has previously been an issue with someone named the word for ඞ pics i think.

3 Likes