Name restriction plugin request?

What if instead of rejecting a player,
Grab the player name and scan for illegal characters and replace them with nothing.
Then set their name to the fixed name.
Only reject a player if a player name has all illegal characters.
^Just an idea.

replace = Player.Name.Replace('F***', '').replace('&', '').replace('$$$', '')
Player.Name = replace
If Player.Name == "":
Kick(Reason)
 
What if instead of rejecting a player,
Grab the player name and scan for illegal characters and replace them with nothing.
Then set their name to the fixed name.
Only reject a player if a player name has all illegal characters.
^Just an idea.

replace = Player.Name.Replace('F***', '').replace('&', '').replace('$$$', '')
Player.Name = replace
If Player.Name == "":
Kick(Reason)

I like that idea, it'd probably be easier to make than a plugin that has to scan for every illegal character.
 
I like that idea, it'd probably be easier to make than a plugin that has to scan for every illegal character.
Not at all.

What if instead of rejecting a player,
Grab the player name and scan for illegal characters and replace them with nothing.
Then set their name to the fixed name.
Only reject a player if a player name has all illegal characters.
^Just an idea.

replace = Player.Name.Replace('F***', '').replace('&', '').replace('$$$', '')
Player.Name = replace
If Player.Name == "":
Kick(Reason)
Atm the plugin uses regex to allow UTF8 chars, tho idk why can't we get the ASCII thing working, while it shouldn't even be working.

Checkin the player name's length is a bit better.