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

No Swear?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cirovic
Senior Member
Join Date: Sep 2019
Old 05-03-2020 , 15:34   No Swear?
Reply With Quote #1

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

Last edited by Cirovic; 05-03-2020 at 15:43.
Cirovic is offline
Old 05-03-2020, 15:39
Cirovic
This message has been deleted by Cirovic.
Old 05-03-2020, 17:44
thEsp
This message has been deleted by thEsp. Reason: I took one word into account.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-03-2020 , 17:48   Re: No Swear?
Reply With Quote #2

Quote:
Originally Posted by thEsp View Post
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.
__________________
fysiks is offline
Cirovic
Senior Member
Join Date: Sep 2019
Old 08-30-2020 , 14:12   Re: No Swear?
Reply With Quote #3

bump
Cirovic is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-30-2020 , 16:29   Re: No Swear?
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
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.
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-30-2020 , 17:01   Re: No Swear?
Reply With Quote #5

Surround your swear words with spaces?

" karam "
__________________
Bugsy is offline
Cirovic
Senior Member
Join Date: Sep 2019
Old 08-30-2020 , 17:30   Re: No Swear?
Reply With Quote #6

i did like this, http://prntscr.com/u8loik
but dont work
Cirovic is offline
Cirovic
Senior Member
Join Date: Sep 2019
Old 08-30-2020 , 18:59   Re: No Swear?
Reply With Quote #7

its ok now, but can you please edit plugin that when someone swear his msg does not appear and do not alert admins.. thanks
Cirovic is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-30-2020 , 20:56   Re: No Swear?
Reply With Quote #8

Untested

Spoiler
__________________

Last edited by Bugsy; 08-31-2020 at 20:04.
Bugsy is offline
Cirovic
Senior Member
Join Date: Sep 2019
Old 08-30-2020 , 21:25   Re: No Swear?
Reply With Quote #9

they still can swear in chat.. like there is no plugin
Cirovic is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-30-2020 , 21:30   Re: No Swear?
Reply With Quote #10

Are you sure you're running the latest code?
__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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 09:27.


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