Raised This Month: $12 Target: $400
 3% 

Auto swear gag


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-21-2012 , 09:49   Re: Auto swear gag
Reply With Quote #33

It's all about the patterns and match indexes.

Here's an example:
^.*fuck.*$

That is a simple one saying that players cannot say "fuck"..

If you wanted to white list a word or pattern for this:
1. Add parenthesis around your word in the pattern for the swear filter: ^.*(fuck).*$
2. Count the number of open parenthesis it takes to reach your word: 1
3. Use this new pattern as the swear filter, and this number is your match index.
4. Add a white list that will match "fucking": /fucking/

That's it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 04:53.


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