AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   No Swear? (https://forums.alliedmods.net/showthread.php?t=324008)

Cirovic 05-03-2020 15:34

No Swear?
 
In this plugin, i added swear "karam" and when someone types "karambit" it detects word.. so can someone please fix this "problem"

fysiks 05-03-2020 17:48

Re: No Swear?
 
Quote:

Originally Posted by thEsp (Post 2697982)
At line 156:
Code:
if ( containi ( said, g_swearWords[i++] ) != -1 )
->
Code:
if ( equali ( said, g_swearWords[i++] ) )

That change would basically break the plugin because it would never detect any of the words that are in sentences. It's called "simple" because it can't take into account a whole lot of variations in words/sentences.

Probably the best option is to use a regex-based version where you can specify word boundaries before and after the word. This will rule out detecting 'bad' words that are wholey contained in a 'no-so-bad' word.

Cirovic 08-30-2020 14:12

Re: No Swear?
 
bump

fysiks 08-30-2020 16:29

Re: No Swear?
 
Quote:

Originally Posted by fysiks (Post 2697983)
Probably the best option is to use a regex-based version where you can specify word boundaries before and after the word. This will rule out detecting 'bad' words that are wholey contained in a 'no-so-bad' word.


Bugsy 08-30-2020 17:01

Re: No Swear?
 
Surround your swear words with spaces?

" karam "

Cirovic 08-30-2020 17:30

Re: No Swear?
 
i did like this, http://prntscr.com/u8loik
but dont work

Cirovic 08-30-2020 18:59

Re: No Swear?
 
its ok now, but can you please edit plugin that when someone swear his msg does not appear and do not alert admins.. thanks

Bugsy 08-30-2020 20:56

Re: No Swear?
 
Untested

Spoiler

Cirovic 08-30-2020 21:25

Re: No Swear?
 
they still can swear in chat.. like there is no plugin

Bugsy 08-30-2020 21:30

Re: No Swear?
 
Are you sure you're running the latest code?

Cirovic 08-31-2020 07:50

Re: No Swear?
 
yes.

Bugsy 08-31-2020 20:04

Re: No Swear?
 
My bad, try now


All times are GMT -4. The time now is 09:01.

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