The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ANTI SWEARING?
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #1
ANTI SWEARING?
Guys, some tips to start a anti swearing system?
is it possible?

maybe replacing set words by ASCII characters?

GO %&~#@ Your self ?
09-30-2014 01:28 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: ANTI SWEARING?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-30-2014 03:15 PM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #3
RE: ANTI SWEARING?
Thanks extreme but i could not tell how to start... in game if i say an unwanted word is it possible to change it???? or that is only clientside?
10-01-2014 03:02 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: ANTI SWEARING?
PHP Code:
[SPEECH SPK_PLAYER]
ON=*
serv.<args
start here

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
10-01-2014 03:35 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: ANTI SWEARING?
By the way the client have a built-in obscenity filter !(but just english words)
(This post was last modified: 10-01-2014 03:51 AM by darksun84.)
10-01-2014 03:47 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #6
RE: ANTI SWEARING?
Thanks!
10-01-2014 04:51 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #7
RE: ANTI SWEARING?
Okey, once again i need some help, wasnt hard to replace a single forbidden word from a string, but the thing is how could i replace multiple words in a single function that returns the complete text but the matched badwords replaced by a newword?

Code:
[SPEECH spk_player]
ON=*
FORBIDDENWORDS <ARGS>

[FUNCTION FORBIDDENWORDS]
LOCAL.ARGS = <ARGS>
ARGS=BW1,BW2,BW3,BW4,BW5,BW6,BW7,BW8,BW9,BW10
FOR 0 <EVAL <ARGV>-1>
IF STRMATCH("*<ARGV[<LOCAL._FOR>]>*","*<LOCAL.ARGS>*")
LOCAL.BWORDS ++
LOCAL.BADWORDS .= <STRREPLACE <ARGV[<LOCAL._FOR>]>,%&@#&$,<LOCAL.ARGS>>
ENDIF
ENDFOR

This way will return N ARGS, depending on how many bad words were said and each <LOCAL.BADWORDS> will have one of the word replaced but the other ones wont be, as logic...

i havent been able to figure a way to replace every bad word in a single text.

thanks in advance
(This post was last modified: 10-01-2014 12:34 PM by kn4tseb.)
10-01-2014 12:32 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #8
RE: ANTI SWEARING?
Code:
[SPEECH spk_player]
ON=*
LOCAL.COLOR <dARGN2>
LOCAL.ARGS <ARGS>
ARGS BW1,BW2,BW3,BW4,BW5,BW6,BW7,BW8,BW9,BW10
FOR 0 <EVAL <ARGV>-1>
IF STRMATCH("<ARGV[<LOCAL._FOR>]>","<LOCAL.ARGS>")
  LOCAL.ARGS <STRREPLACE <ARGV[<LOCAL._FOR>]>,%&@#&$,<LOCAL.ARGS>>
ENDIF
ENDFOR
ARGS <LOCAL.ARGS>
SAY @<dLOCAL.COLOR>,,1 <ARGS>
RETURN 1

Try this...

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
10-01-2014 01:08 PM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #9
RE: ANTI SWEARING?
Worked great, only the color wasnt stored inside the function so i set it manually
10-01-2014 02:13 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)