Raised This Month: $ Target: $400
 0% 

Question about comparing strings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-17-2011 , 22:51   Question about comparing strings
Reply With Quote #1

So in my server we like to keep things pretty family oriented. Meaning no cursing or offensive names.

So say some one comes into the game with the name "Top Assassin". and i dont want the word ASS to be used in a name. if i compare the string with contain flag it will catch assassin right?

So thats one issue but if i use equal DUMBFUCKBITCH wouldn't be caught no matter what filter.

So is there away to make sure its not part of a larger word (to be honest it needs some one watching it.)
Doc-Holiday is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-17-2011 , 23:26   Re: Question about comparing strings
Reply With Quote #2

If you want a relatively accurate way you'll need a dictionary to skip words like "assassin" but not "dumbass" for example.

Still, people can screw words up and avoid any automated filtering methods anyway, so the best way is to have active admins that maintain the order if you really want to keep things cool, I've been using it while I had the server and it was much better than any other server that used plugins instead.
__________________

Last edited by Hunter-Digital; 11-17-2011 at 23:30.
Hunter-Digital is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2011 , 00:24   Re: Question about comparing strings
Reply With Quote #3

Quote:
Originally Posted by Doc-Holiday View Post
So say some one comes into the game with the name "Top Assassin". and i dont want the word ASS to be used in a name. if i compare the string with contain flag it will catch assassin right?
What is "conatin flag"?

Quote:
Originally Posted by Doc-Holiday View Post
So thats one issue but if i use equal DUMBFUCKBITCH wouldn't be caught no matter what filter.
What? No, it does not contain the word "ass".
__________________
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-18-2011 , 18:16   Re: Question about comparing strings
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
What is "conatin flag"?



What? No, it does not contain the word "ass".
Thanks hunter for understanding me...

Containi native is what I meant.

And it was an example.not meant to have ass in the swear word name...

I think I'm going to make it alert the admins that are.on the server if there is as well as a console.message since most of my servers are home servers. We watch the consoles alot.

Thanks though

Last edited by Doc-Holiday; 11-18-2011 at 21:06.
Doc-Holiday is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2011 , 22:55   Re: Question about comparing strings
Reply With Quote #5

Quote:
Originally Posted by Doc-Holiday View Post
And it was an example.not meant to have ass in the swear word name...
It helps when examples make some sense.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode