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

Auto swear gag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 01-02-2011 , 23:51   Auto swear gag
Reply With Quote #1

Hello, I was wondering if anyone could take the time to modify an existing
gag plugin (like this one) or make a new one?

The functions I want is to be able to write the words that there should be
a punishment on in file and then if a player writes the word in-game
chat, the player shall first obtain the gag for 5 minutes but if this foul language is repeated
the punishment shall also be worse ...

I also want this plugin to be reseted every day.
So if anyone has used foul language on my game server today and got 5 min gag, he does not get 15 min gag tommorow if he uses such language
but instead it will start again from 5 min.

I would also appreciate if there are cvars for the diffrent levels of gag,

example:
Gag, Level 1 (First time 5min auto gag)
Gag, Level 2 (Secound time 15 min auto gag)
Gag, Level 3 (Theird time 25 min auto gag)
Gag, Level 4 (...and so on...)
Gag, Level 5 (...and so on...)

Please help me! And sorry for my bad English.
__________________
CAOSK-ESPORTS.COM

Last edited by Schpraaankiii; 02-16-2012 at 09:23.
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
MostwantedScript
Senior Member
Join Date: Sep 2010
Location: Sweden,Gothenburg
Old 01-03-2011 , 17:48   Re: Auto swear gag
Reply With Quote #2

Yes ive seen this, im also looking for this. ill see if i can find or possible script it

UPDATE

https://forums.alliedmods.net/showthread.php?p=13197

This dont have ur requests but u might be able to recode it? or else just contact me pvt msg

It removes all the most used swearing words. in german, nor , english , u can add ur own example swedish.
__________________
Owner & Creator of
http://mostwantedhf.info

Last edited by MostwantedScript; 01-05-2011 at 09:21.
MostwantedScript is offline
Send a message via Skype™ to MostwantedScript
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 02-15-2012 , 17:47   Re: Auto swear gag
Reply With Quote #3

Quote:
Originally Posted by MostwantedScript View Post
Yes ive seen this, im also looking for this. ill see if i can find or possible script it

UPDATE

https://forums.alliedmods.net/showthread.php?p=13197

This dont have ur requests but u might be able to recode it? or else just contact me pvt msg

It removes all the most used swearing words. in german, nor , english , u can add ur own example swedish.
I wount be able to recode it couse I can't code plugins xd
Please someone help me with it! 2 years have passed and I am still looking for this kind of plugin :p
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 10:18   Re: Auto swear gag
Reply With Quote #4

Here you go.

Customizaiton:
- Change the define at the top of the plugin to not gag players
- Note: Removing the gag takes away the warning cvar and times command.

Pattern Sizes:
- If it seems that your patterns are failing at load because they are too long,
- Then open the plugin and increase the allowed pattern size at the top.

Requirements:
- AMX Mod X 1.8.1 or higher
- RegEx module
- NVault module (if you have gag enabled)

Cvars:
- swear_filter_warning "message"
- Message shown to player first time they are found using a swear word

- swear_filter_log <0|1>
- 1 = logs all captured swears, 0 = don't log

- swear_filter_hide_hard <0|1>
- If you are using a chat plugin that replaces current chat (colored, ghost chat, etc.), then set this to 1
- Also, you would need to put this plugin at the bottom of the plugins.ini, and that chat plugin directly below it.
- Otherwise, keep this as 0

Server Command:
- swear_filter_times <time1> [time2] [time3] ...
- Time sent to amx_gag command when player is gagged
- Use 1 time to not have levels
- If player reaches the maximum gag time in this list, player will be gagged at that time again if caught swearing again

Logs:
- All chat message caught by the filter are logged to addons/amxmodx/logs/swear_filter/YYYY-MM-DD.log
- It provides the message the player type, and all the matches that were found in the filter

File Setup:
- File is located at addons/amxmodx/configs/swear_filters.ini
- Format:
Code:
; Lines starting with a ';' are comments and are ignored
// These are also comments and are ignored

; Blank lines are okay to have too

; Format of adding a swear filter:
;"filter type" "filter to check again" "match index for regex"
; 
; Filter types can be:
; "regex" - The filter being checked is a RegEx pattern
; "string" - The filter being checked is a string to check
; 
; If you need to use " in your patterns or strings, be sure to put a \ in front of them.
; 
; The match index is not required for "string" types
; The match index is the position in the RegEx pattern to compare the matched text with the white lists
; If you do not want to match white lists, omit the match index
; 
; If you don't want to warn players, but still hide the message from chat
; You can add "hide" to the end of the line
; 
; Example blocking IP addresses:
; "regex" "(((1[0-9]|[1-9]|2[0-4])?[0-9]|25[0-5])\.){3}((1[0-9]|[1-9]|2[0-4])?[0-9]|25[0-5])"
; 
; Example blocking bad words:
; "regex" "ass|dick|fuck|shit" ; etc.
; or
; "string" "ass"
; "string" "dick"
; "string" "fuck"
; "string" "shit"
; 
; Example hiding some commands from chat
; "string" "timeleft" "hide"
; "regex" "^\/\S+(\s+((\"[^\"]*\")|([^\s\"]*)))" "hide"
White Listing the Filters:
- If some words are being caught by the filter that shouldn't and having the filter ignore them is too much, you can add them to the white list.
- The file is located at addons/amxmodx/configs/swear_whitelist.ini
- The file structure should be like this:
Code:
; Lines starting with a ';' are comments and are ignored
// These are also comments and are ignored

; Blank lines are okay to have too

; Format of adding a swear white list:
;/regex pattern/
You will need to compile locally with these includes:
http://forums.alliedmods.net/showthread.php?t=91915 (only if you have gag enabled)

If you are using AMXX Gag by xPaw and myself, then you will need to be sure to set the time units to be minutes, or change your gag times accordingly.

Note that if a player is gagged from the swear filter, it will not reset at the end of the day if the gag is too long.
Attached Files
File Type: sma Get Plugin or Get Source (swear_filter.sma - 1903 views - 10.3 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 02-22-2012 at 13:17.
Exolent[jNr] is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 02-16-2012 , 12:20   Re: Auto swear gag
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Here you go.

Requirements:
- AMX Mod X 1.8.1 or higher
- RegEx module
- NVault module

Server Command:
- swear_filter_times <time1> [time2] [time3] ...
- Time sent to amx_gag command when player is gagged
- Use 1 time to not have levels
- If player reaches the maximum gag time in this list, player will be gagged at that time again if caught swearing again

You will need to compile locally with these includes:
http://forums.alliedmods.net/showthread.php?t=91915
http://forums.alliedmods.net/showthread.php?t=163205

If you are using AMXX Gag by xPawn and myself, then you will need to be sure to set the time units to be minutes, or change your gag times accordingly.

Note that if a player is gagged from the swear filter, it will not reset at the end of the day if the gag is too long.
That plugin dosent even have regex filters with regex commands?
Ejziponken is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 12:26   Re: Auto swear gag
Reply With Quote #6

Quote:
Originally Posted by Ejziponken View Post
That plugin dosent even have regex filters with regex commands?
The plugin I attached uses Regex.
It is supposed to be used with a gag plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 02-16-2012 , 12:28   Re: Auto swear gag
Reply With Quote #7

Then it dosent work as it should.

.apa only blocks .apa and not lolapa

So what could be the problem?
Ejziponken is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 12:31   Re: Auto swear gag
Reply With Quote #8

Quote:
Originally Posted by Ejziponken View Post
Then it dosent work as it should.

.apa only blocks .apa and not lolapa

So what could be the problem?
The file does not allow regular expressions.
It checks for words that you give it.

I can modify it to work with both, give me a minute or so.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 02-16-2012 , 12:33   Re: Auto swear gag
Reply With Quote #9

The point with regex is to have regular expressions? =D

I been looking for a plugin with regular expressions for a long time now, so if you could fix that i would be VERY happy.

But if u gonna fix it, it should ONLY have regular expressions.

.apa should ONLY block *apa and not apa or apalol
apa should only block apa
.apa. should block only lolapalol

Hope u understand.

Last edited by Ejziponken; 02-16-2012 at 12:35.
Ejziponken is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 12:54   Re: Auto swear gag
Reply With Quote #10

Updated to allow RegEx in file. See post for details.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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:12.


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