Raised This Month: $59 Target: $400
 14% 

Anti-Bigot with RegX matching


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose        Approver:   BAILOPAN (72)
Manip
Senior Member
Join Date: Jan 2004
Old 11-22-2004 , 16:31   Anti-Bigot with RegX matching
Reply With Quote #1

Version: 1.2

This is an anti-racism plugin. I have taken the most advanced version I could find and added regular expression support to it.

Place a regular expression list in your AMXx config folder called Bigot.ini (basic list supplied).

The CVAR sv_bigotmode is used to control what happens each time someone uses racism apart from it being blocked.

1 - Bans the offender for 48 hours
2 - Kicks the offender off the server
3 - Bans the offender PERMANTLY
4 - Kills the offender

Commands:
amx_bigottest <String> - Test a string to see if it is detected.

Note: Requires Regular Expression support module activated (Modules.ini).

Originally written by Bad HAL 9000 with help from BAILOPAN and FreeCode which was based off of the 'Say BS' plugin by f117bomb.. modified by JTP10181 to add killing ..

JTP has written some improvements on the 1.0b version up to 1.2 and
also included a way better regular expressions list. THANKS JTP!
Attached Files
File Type: sma Get Plugin or Get Source (amx_antibigot.sma - 2186 views - 5.7 KB)
File Type: zip amx_antibigot.zip (2.5 KB, 958 views)
Manip is offline
Send a message via AIM to Manip
Spazz
Junior Member
Join Date: Mar 2004
Location: Philadelphia, PA
Old 11-22-2004 , 16:51  
Reply With Quote #2

Nice post. Im giving it a try.
__________________
I hate steam
Spazz is offline
Send a message via AIM to Spazz Send a message via MSN to Spazz Send a message via Yahoo to Spazz
Manip
Senior Member
Join Date: Jan 2004
Old 11-23-2004 , 02:52  
Reply With Quote #3

The ^ issue has been resolved. This plugin can now be used on a full range of regular expressions.
Manip is offline
Send a message via AIM to Manip
pendragon
Senior Member
Join Date: Mar 2004
Location: In a bubble
Old 11-23-2004 , 14:45  
Reply With Quote #4

do you possibly forsee using mysql with this?
It would be awesome to have this data sent to a mysql db.
__________________
pendragon is offline
Send a message via ICQ to pendragon Send a message via AIM to pendragon Send a message via MSN to pendragon
ronin
Member
Join Date: Jul 2004
Old 11-24-2004 , 03:39  
Reply With Quote #5

This is bloody wonderfull
Best plugin ever
Great job
ronin is offline
ronin
Member
Join Date: Jul 2004
Old 11-24-2004 , 03:46  
Reply With Quote #6

I think there might be a problem with \w\s*jew\b
It doesn't seem to ban on this one
ronin is offline
Morpheus
Senior Member
Join Date: Mar 2004
Old 11-24-2004 , 08:58  
Reply With Quote #7

Hi there!

If I want this to work with amxbans, which also automatically kicks the player.. how should the ban be?

Normal when u ban, its like amx_ban 2880 name reason

I would like it to have the ban something like it.

Code:
server_cmd("banid 2880 `"%s`" kick;wait;writeid",authtoban)
Changed to

Code:
server_cmd("amx_ban 2880 %i %s Bad language",authtoban)
Correct?

And where should bigot.txt go in the amxmodx folder?

Cheers

Morpheus
Morpheus is offline
Manip
Senior Member
Join Date: Jan 2004
Old 11-24-2004 , 10:09  
Reply With Quote #8

Quote:
Originally Posted by ronin
I think there might be a problem with \w\s*jew\b
It doesn't seem to ban on this one
Keep in mind \w means a letter. Please excuse this, but 'fucking jew' will get detected because it has a letter, then a space then the word jew.

Currently the term 'jew' ('j3w' and 'j3w' are though) alone is not counted as racism. You can however change that:

\bj[^aeou]*w\b
becomes
\bj[^aou]*w\b

That will detect the word 'jew' always.

Morpheus:

Code:
server_cmd("amx_ban %s 2880 Bad language",authtoban)
(You had the time and authID inverted.)
Manip is offline
Send a message via AIM to Manip
ronin
Member
Join Date: Jul 2004
Old 11-24-2004 , 14:40  
Reply With Quote #9

Quote:
Originally Posted by Manip
Keep in mind \w means a letter. Please excuse this, but 'fucking jew' will get detected because it has a letter, then a space then the word jew.

Currently the term 'jew' ('j3w' and 'j3w' are though) alone is not counted as racism. You can however change that:

\bj[^aeou]*w\b
becomes
\bj[^aou]*w\b

That will detect the word 'jew' always.
I would keep it in mind if i could figure out how the expressions worked
ronin is offline
Morpheus
Senior Member
Join Date: Mar 2004
Old 11-24-2004 , 16:55  
Reply With Quote #10

Quote:

Morpheus:

Code:
server_cmd("amx_ban %s 2880 Bad language",authtoban)
(You had the time and authID inverted.)
What does %s do?

Because the amxban command is like this:

amx_ban time name reason and not like amx_ban player time reason? Wrong

And where should the txt file go?

Cheers

Morpheus
Morpheus 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 05:45.


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