What happened to OC? - CLOSED Carnage?!
Enclusion

Renaming Players if Bad Words Detected In Name

12 posts in this topic

Made at the request of @CartmansPieHole

 

This script will changed anyone who joins your server's name to something else if their name contains something in a list of banned words/characters. Server moderators can use this to ban bad words in names or just names you don't like. This will log a message to the console when a players name is changed.

 

Download: https://raw.githubusercontent.com/TagiaNetwork/SAPP-Scripts/master/BannedNameChanger.lua

 

Video: 

 

Credits:

OnNameRequest by @Devieth

badwordsarebad by @Kavawuvi

 

 

 

BannedNameChanger.lua

Edited by Enclusion
Updated to 1.3 (Add banned word list and allow toggling features on or off)
Sunstriker7, Ryx, Takka and 1 other like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

7 hours ago, Tucker933 said:

Great work dude!

Thanks. It's my first script so it's not much but I'm glad I got it working. They goodness for devieth doing most of the work by making the OnNameRequest function lol

Update 1.1:

- Fixed duplicated "BannedName" players in scoreboard
- Added new console log showing what the users new name was in addition to the old name
- Still persecutes halo PC users, i think (haven't tested because why would I its halo pc)

geFGYm7.jpg

Share this post


Link to post
Share on other sites

I'd like to see this integrated with banned words on chat, maybe with a way to easily turn on/off both filters through a script  For example:

 

RenameBadNames =TRUE/FALSE (or "On" / " Off")

RejectBadText = TRUE/FALSE (or "On" / " Off")

 

I know there's a script out there that will send text to the player typing bad words and not display what they typed on the screen.  It just would be nice to have to end up having to edit only one table of banned words.

 

Nice job on the script, though.  BTW, I just noticed that on another thread that you mentioned my name and made this script at my request.  Thanks!

Edited by CartmansPieHole
Sunstriker7 and Enclusion like this

Share this post


Link to post
Share on other sites
3 hours ago, CartmansPieHole said:

I'd like to see this integrated with banned words on chat, maybe with a way to easily turn on/off both filters through a script  For example:

 

RenameBadNames =TRUE/FALSE (or "On" / " Off")

RejectBadText = TRUE/FALSE (or "On" / " Off")

 

I know there's a script out there that will send text to the player typing bad words and not display what they typed on the screen.  It just would be nice to have to end up having to edit only one table of banned words.

 

Nice job on the script, though.  BTW, I just noticed that on another thread that you mentioned my name and made this script at my request.  Thanks!

I can get that done. I will probably have it be a separate script and just allow it to read from the same file, fairly simple.

Share this post


Link to post
Share on other sites
On 5/18/2020 at 5:20 AM, Enclusion said:

I can get that done. I will probably have it be a separate script and just allow it to read from the same file, fairly simple.

When you say separate script, are you saying that you'd have to create a new script to do both in one script?

Sorry, I'm unable to play Halo right now, the game keeps crashing.  I posted a topic on it in the Halo PC General forum, so until it's resolved, I'm unable to test anything.

Share this post


Link to post
Share on other sites
On 5/22/2020 at 4:55 AM, CartmansPieHole said:

When you say separate script, are you saying that you'd have to create a new script to do both in one script?

Sorry, I'm unable to play Halo right now, the game keeps crashing.  I posted a topic on it in the Halo PC General forum, so until it's resolved, I'm unable to test anything.

I'd have a separate script read from the same banned word list. You'd have to load both.

I updated the script to version 1.2 which prevents blocked name count from going over 99. Since most servers have 16 player count it goes into double digits so i let the count go to 99 but reset it after that point to prevent triple digits. This will make sure you can always use the highest character count for the replaceWith variable and not have it break once your server is on long enough to hit 100 banned names.

AeyJQZL.png

 

On 5/18/2020 at 4:10 AM, CartmansPieHole said:

I'd like to see this integrated with banned words on chat, maybe with a way to easily turn on/off both filters through a script  For example:

 

RenameBadNames =TRUE/FALSE (or "On" / " Off")

RejectBadText = TRUE/FALSE (or "On" / " Off")

 

I know there's a script out there that will send text to the player typing bad words and not display what they typed on the screen.  It just would be nice to have to end up having to edit only one table of banned words.

 

Nice job on the script, though.  BTW, I just noticed that on another thread that you mentioned my name and made this script at my request.  Thanks!

I ended up just doing what you asked and implemented @Kavawuvi's badwordsarebad script into mine. I also added the ability to toggle name banning or chat banning on or off.

 nbG1FJp.png

As always I am open to suggestions and comments.

 

BannedNameChanger.lua

Edited by Enclusion
Takka and CartmansPieHole like this

Share this post


Link to post
Share on other sites

Thanks.  My head hasn't been into the game lately...stupid COVID-19 stress related.  I'll check out the script this weekend.  I haven't quite figured out what all I'm going to do right now.

One sort of side comment I'll make is, I'd been noticing that, I believe SAPP can handle a lot of the edits that I had to do manually, some 15 years ago, which was nice.  For instance, I saw some script about infinite weapons, and I believe I saw another regarding fall damage, to which I swear I saw a script on.  I mean, it doesn't matter anyways because the maps were already modded by me, years ago.  I also had implemented the right-click banshee shoot on a ghost, to which I'm guessing this is possible to do via script now, instead of modifying every single map through...I think I used HHT for this, back in the day.  It's been years, so my memory isn't all that great anymore on it.  Plus, I more recently researched my old clan's forums, and I think i'd left  some info on those.  Unfortunately, all of the InvisionFree boards were deleted.  I think they offered backups, but I'd missed the cutoff.

Sorry, just kinda rambling on.  I'll let you know if I have any further comments regarding the script.  I believe that I am looking for a simple all-in-one script, at the end of the day,  but this sounds like a good start.  Thanks again.

 

EDIT

Couldn't sleep. Ugh.  So, I'm looking at the new code.
 

OK, so I'm not interested in renaming bad player names to simply just "Blocked1", "Blocked2", etc. 

I'm thinking of two different possible scenarios for this.  They both would probably work, but you tell me:

  • Renaming all players to a random pick of a name in a table.  I think this would be more fun, actually.  For instance:
    • newNames = {Sucker, GoHome, ISukatHalo, Cortana}  ....you get the picture.  A player with a banned name is randomly assigned a name from this table
    • I would also need to check if the name to be used is not already in use.  Correct?  How?
  • Renaming all players with banned names to New001 and letting Halo rename them systematically as additional New001 players come in.  Will this work if there already is an existing New001 player?
    • I'm looking at he coding and I can see where/how the two variables replaceWith and newReplace can be modified to make this happen.  I just might only need one of these variables, since I'm not attempting to just add a number to a player name.

Again, I probably want to go off of my own list (first bullet point) vs New001.  How would I do this?

Edited by CartmansPieHole

Share this post


Link to post
Share on other sites

Sorry to bump this thread but is it possible to have it converted to use regex detection solution. Because people can still join using part of the word, or uppercase(if i have it listed in lowercase) and vice versa.

Enclusion likes this

Share this post


Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.