Forums Index >> General >> Special Character Remover Script!



Page : <1> :


This is already on the current games feature broken thread, and was suggested there.

This script will remove any special character in a player's name upon entering your server...
You can add more characters to the allowed list tough :)

Download here:
Windows/Linux
Mac

Extract it into game/server/scripts, then add this to the main.cs:

//Art Crazy's Special Character Remover From Nickname
$SpecialCharRemover::allowedChars = "0123456789abcdefghijklmnopqrstuvxwyzABCDEFGHIJKLMNOPQRSTUVXWYZ ()[]-_,.;:?!*|{}";
e xec("game/server/scripts/SpecialCharsRemover.cs");

NOTE: There IS a space between the Z and the ( else spaces will be removed from names! There also isn't any line break between = and "! Be careful!

From now on, ANYTHING not inside the "" of the line

 

$SpecialCharRemover::allowedChars = "0123456789abcdefghijklmnopqrstuvxwyzABCDEFGHIJKLMNOPQRSTUVXWYZ ()[]-_,.;:?!*|{}";

 

WILL get removed from player's names! So if you want to add more characters to the allowed ones, just put it inside the " and " somewhere.

Dazzle(UF) was kind enough to make a readme for installing this script, it's inside the.zip :)


Last edited: Tuesday, August 15, 2006 at 1:05:26 PM

Thursday, August 10, 2006 at 5:38:30 PM

It should also work on Linux too for us lucky server hosters.

Thursday, August 10, 2006 at 5:43:55 PM

I would add () and [] for armies and bots.

Pray to GOD for him to reveal himself to you.

Thursday, August 10, 2006 at 5:46:57 PM

^^ Yup... Edited it a little bit :)

^ Guess so, it's something used a lot! I'll edit it :) Btw Bots are not checked by this script!


Last edited: Thursday, August 10, 2006 at 5:48:17 PM

Thursday, August 10, 2006 at 5:47:02 PM

I'm not sure if it works on Linux. I don't have () and [] in my allowed list, but my bots are working fine. Ubuntu 5.10, kernel 2.6.12.16-10.

Thursday, August 10, 2006 at 5:56:52 PM

Bots aren't checked by the script, make your name have anything not on the allowed list, then join and see if it got removed...

PS: I've added some commonly used characters, that do not hurt nor the hoster (easy to reproduce in common keyboards) nor the current games page. If you don't want them, you can always remove them :)


Last edited: Thursday, August 10, 2006 at 5:58:50 PM

Thursday, August 10, 2006 at 5:57:50 PM

...Destroyer? Want to test it?

Thursday, August 10, 2006 at 6:00:44 PM

Just join your server like DJ Wings® and see if the ® is removed


Thursday, August 10, 2006 at 6:01:50 PM

I can't start TT yet, I'll try it tomorrow.

Thursday, August 10, 2006 at 6:04:04 PM

@Everyone
If you downloaded before this post, please redownload. Updating the preference wasn't really affecting the script... I had to recompile! Sorry about that! It's a recently released script y'know!


Thursday, August 10, 2006 at 6:04:35 PM

That;s the downside of having closed-source scripts... FOSS or nothing!

Thursday, August 10, 2006 at 6:06:52 PM

It still worked, but with only a-z A-Z and 0-9 (the first set I released)... Editing the preference wouldnt matter, it was getting reedited inside the file :)

I have to go now... 2AM! If you have problems and whatnot post here or e-mail me at my yahoo e-mail in profile... I'll check out all that stuff tomorrow :)


Last edited: Thursday, August 10, 2006 at 6:14:15 PM

Thursday, August 10, 2006 at 6:12:09 PM

Woot woot! Now it will be easier to ignore people, too. The scroll thing never worked for me.

Pardon my rudeness, I cannot abide useless people.

Thursday, August 10, 2006 at 7:13:02 PM

This will be great for adminning. Thanks AC! Can't wait to try this when it is ported for Mac.

 

 

-Rx

 

 

Thursday, August 10, 2006 at 9:50:18 PM

NOOO WHY DID I MAKE THE THREAD AHHH. Haha I know what to do nah nah. @£$t5()*Dd*/t*()c haha. Agh / isn't on the script curse scripts.

2.@£$t5()*Dd*vt*()c nah nah.

DD the Dark destroyers will rule you all muwhahahaha.

Friday, August 11, 2006 at 2:07:30 AM

Can everyone add a ™ :o

Friday, August 11, 2006 at 3:21:10 AM


 


What happens if the name is entirely composed of symbols?

 

Name2ShortTryAgain. Piece of cake.
EDIT: Told ya! I logged in as "&*!($^@$)^#_(&%+", and it made me "Name2ShortTryAgain". It works on Linux.

Last edited: Friday, August 11, 2006 at 5:38:39 AM

Friday, August 11, 2006 at 4:38:02 AM

^Good it does!
Yea, because when it is symbols only, the name ends up being nothing, wich the admin script (if you're using) detects as a too short name :)

Has anyone tested on macs? Sometimes it works (rarely, but it still does!)

I have added 3 symbols that were suggested by racer... Also harmless (easily reproduced) and Current Games supports them... It's |{}... If you want to add it, it's in the first post.


Last edited: Friday, August 11, 2006 at 5:59:13 AM

Friday, August 11, 2006 at 5:50:51 AM

Hey AC, seeing how my name is "Captain_Med" would that script reduce it to "CaptainMed"? I need that space there in order for my name to look right. Or does it add a space when a character is removed? Otherwise, could you maybe add the "_" character? After all, it is very easily accessible and all.

/¯/¯/ed

Saturday, August 12, 2006 at 5:45:52 PM

_ is included as an allowed letter.

Saturday, August 12, 2006 at 6:04:23 PM

But surely people can still go on the shockwave servers with annoying symbols and mess it up?

 

Sunday, August 13, 2006 at 4:13:06 AM

That's right. But wait... Why are you going to into the shockwave servers anyway?

Sunday, August 13, 2006 at 7:59:13 AM

^ cut the spam.

Sunday, August 13, 2006 at 8:32:27 AM

I am not spamming.

Oh wait, this is a spam post! Oh no whatever shall we do?

Good work on the script Art, I am installing it on my server and will give it a public test run in a few days.

Sunday, August 13, 2006 at 8:41:08 AM

He took my advice and deleted it to make it look that way, that loser.

Sunday, August 13, 2006 at 8:56:26 AM

I wonder if instead of removing the special characters, you could make it so that the script changes them to a corosponding real letter. May not work for some people, but they wouldn't have their entire name obliterated.

Pardon my rudeness, I cannot abide useless people.

Sunday, August 13, 2006 at 9:23:45 AM

 

 

That's right. But wait... Why are you going to into the shockwave servers anyway?

 

Whether I go into shockwave servers is irrelevant, it's whether the people with funny symbols go into shockwave servers... And if they do, does that not make the script useless, since it'll mess up the current-games thing anyway?

 

Sunday, August 13, 2006 at 9:29:56 AM

@PGG
It'd take too long, I'd have to set something for it to remove by for EVERY symbol possible...~

@bloop
But it'll help admins with their server :)


Last edited: Sunday, August 13, 2006 at 2:10:33 PM

Sunday, August 13, 2006 at 2:09:13 PM

Thanks for the response, -{UF}-Racer445. I shoulda been more persistent in my diligence. That was too obvious. Lolz. XD Anyway, my first question still stands:

 

"...seeing how my name is 'Captain_Med' would that script reduce it to 'CaptainMed'? "

 

 

/¯/¯/ed

Sunday, August 13, 2006 at 8:30:09 PM

^ No, if you look up top, "_" is listed in the list of acceptable symbols.

Sunday, August 13, 2006 at 10:53:41 PM

In any event, the Current Games section is back up, mainly thanks to AC's amazing script. This is a breakthrough.
PS: I figured out how to ue your PHP sig by looking at the HTML source. Is that all right?

Tuesday, August 15, 2006 at 8:05:58 AM

It now has Mac support! Come and get it :)


Tuesday, August 15, 2006 at 1:06:38 PM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald