AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Swear Replacement/Filter (https://forums.alliedmods.net/showthread.php?t=57537)

Hell Phoenix 07-06-2007 12:16

Swear Replacement/Filter
 
7 Attachment(s)
Swear Replacement
Hell Phoenix
http://www.charliemaurice.com/plugins

This plugin is based on kaboomkazoom's amxx swear replacement plugin. It allows you to do 3 different replacement
modes. It also sends a warning to the user that foul language is not allowed. It also checks a players name to
make sure that it doesnt have any bad words in it.

Mode 1 replaces what the user said with a random phrase.
Mode 2 shows just **** (or whatever you set the cvar to) instead of the word (filters it)
Mode 3 doesnt display the users chat at all


Versions:
1.0
* First Public Release!
1.1
* Added Insurgency Mod Support!
* Added Cvar to turn off name checking
* Added custom word replacement (use mode 2)
* Changed Maxplayers from a define to GetMaxClients();
* Log now only logs the original message
* Team say now stays in the team chat instead of getting moved to global chat
1.2
* Fixed some errors from the console/log
1.3
* Fixed crashing
1.4
* Fixed a major loop that caused crashes sometimes (thanks Bailopan)

Todo:

Notes:
The client name doesnt appear in the team color for any mod other than Insurgency. Not sure this will ever be possible
to fix. The only thing you can do if you dont want the persons name to show up all white is to use mode 3 and not
allow it to show at all.

Make sure that badwords.txt and replacements.txt are in your sourcemod/configs/ directory!

Cvarlist (default value):
sm_swear_replace_mode 1 <1|2|3> are valid options
sm_swear_name_check 1 <0|1> are valid options
sm_swear_replace **** <change this to whatever string you want to replace the word if you dont want stars (for mode 2)>

Admin Commands:
None

ferret 07-06-2007 12:42

Re: Swear Replacement
 
I'd suggest a cvar to turn on or off the changename functionality.

Hell Phoenix 07-06-2007 12:44

Re: Swear Replacement
 
Good idea...Ill add that for the next version =D

Shaman 07-06-2007 14:26

Re: Swear Replacement
 
1 Attachment(s)
Here is a Turkish badwords.txt :)

Hell Phoenix 07-06-2007 16:06

Re: Swear Replacement
 
Thanks Shaman. I added most of the words to the list and updated the attached file =D

SirCole 07-09-2007 00:27

Re: Swear Replacement
 
I haven't installed it to try it out yet, but out of interest, can you incorporate a 4th option, where you can replace someones word with another one, but its set

for example I say:

"ahh that guy was a fucking fag"

and it replaces it with

"ahh that guy was a firetrucking fag"

so rather than having it replaced with **** or a its gets a word that I could select..

hopefully that made sense,

Cole

(please excuse the foul language, you wouldn't be reading this thread if you didn't know what bad language was anyway)

Hell Phoenix 07-09-2007 00:35

Re: Swear Replacement
 
Yeah that makes sense. That would be pretty easy to do to. Ill add it for the next version.

SirCole 07-09-2007 00:36

Re: Swear Replacement
 
/me hugs you

Hell Phoenix 07-09-2007 19:10

Re: Swear Replacement
 
I added a rather large update. It fixes a few things I hadnt really thought of at first. The biggest thing is that it works for Insurgency! Even colors work right =D


Updated to 1.1
* Added Insurgency Mod Support!
* Added Cvar to turn off name checking
* Added custom word replacement (use mode 2)
* Changed Maxplayers from a define to GetMaxClients();
* Log now only logs the original message
* Team say now stays in the team chat instead of getting moved to global chat

SirCole 07-12-2007 08:55

Re: Swear Replacement/Filter with Insurgency Support!
 
I like the new bit about replacing the stars ****;

I hate to sound buggy and rude, but how about having some sort of file with a string of things, where more can be added, so I say RUDEWORD and it gets replaced with oops and someone says RAHHRUDEWORD2 and it gets replaced with WHOA!

basically saying that the *** replacement depends on what word is said.

this although not said, will be a very popular idea, and will brings yours above anyone else who starts up a swear type of filter!

Cole

Hell Phoenix 07-12-2007 12:32

Re: Swear Replacement/Filter with Insurgency Support!
 
Im confused....so you want to replace a specific word with a specific other word?

SirCole 07-13-2007 00:28

Re: Swear Replacement/Filter with Insurgency Support!
 
Quote:

Originally Posted by Hell Phoenix (Post 502498)
Im confused....so you want to replace a specific word with a specific other word?


EXACTLY :mrgreen:

BrutalGoerge 07-21-2007 23:58

Re: Swear Replacement/Filter with Insurgency Support!
 
I play in a DODS server, cantaloupe island, and they have that already.
Say fag, it gets replaced with hamham
Say n-word, it gets replaced with grandma
I have been trying to find out how they do it. This plugin is the closest thing I can find, but it doesn't quite do it.

SirCole 07-22-2007 00:31

Re: Swear Replacement/Filter with Insurgency Support!
 
they might use eventscripts of the sort!

I have done it with eventscripts before, its really easy as its like writing a simple if statement, alone the lines of a batch script!

imported_sparky 08-09-2007 19:08

Re: Swear Replacement/Filter with Insurgency Support!
 
this plugin freezes my server dods linux latest vertion of sm

Hell Phoenix 08-10-2007 10:58

Re: Swear Replacement/Filter with Insurgency Support!
 
Any errors? Does it freeze it at server start or when you say something? A little more info would be helpful next time.

imported_sparky 08-10-2007 16:47

Re: Swear Replacement/Filter with Insurgency Support!
 
Im sorry was a busy day yesterday my bad

I would say it freezes when someone says something because when i look in console it is still up but i cant type anything in console I must ctrl C to close the server. It runs fine without this plugin


here is the plugins im running

metamod

19:55:34 SourceMod Version Information:
SourceMod Version: 1.0.0.1268
JIT Version: JIT (x86), 1.0.0.1172
JIT Settings: Generic i686
http://www.sourcemod.net/
sm

19:55:34 SourceMod Version Information:
SourceMod Version: 1.0.0.1268
JIT Version: JIT (x86), 1.0.0.1172
JIT Settings: Generic i686
http://www.sourcemod.net/

19:51:12 [SM] Listing 15 plugins:
01 "Nextmap" (1.0.0.1268) by AlliedModders LLC
02 "Admin File Reader" (1.0.0.1268) by AlliedModders LLC
03 "HLstatsX Plugin" (1.2) by Tobi17
04 "Basic Info Triggers" (1.0.0.1268) by AlliedModders LLC
05 "Anti-Flood" (1.0.0.1268) by AlliedModders LLC
06 "Mapchooser" (1.3) by ferret
07 "RockTheVote" (1.4) by ferret
08 "Weapon Logging" (1.2) by Tobi17
09 "SMF Admins" (1.0.0.0) by devicenull
10 "Ads" (1.0.2.0) by Shane A. ^BuGs^ Froebel
11 "Basic Commands" (1.0.0.1268) by AlliedModders LLC
12 "Basic Fun Commands" (1.0.0.1268) by AlliedModders LLC
13 "Admin Help" (1.0.0.1268) by AlliedModders LLC
14 "Basic Chat" (1.0.0.1268) by AlliedModders LLC
15 "Reserved Slots" (1.0.0.1268) by AlliedModders LLC

bl4nk 08-10-2007 20:33

Re: Swear Replacement/Filter with Insurgency Support!
 
Try updating your SourceMod installation.

imported_sparky 08-10-2007 23:02

Re: Swear Replacement/Filter with Insurgency Support!
 
same result :(

23:01:22 SourceMod Version Information:
SourceMod Version: 1.0.0.1310
JIT Version: JIT (x86), 1.0.0.1172
JIT Settings: Generic i686
http://www.sourcemod.net/

vasp 09-05-2007 09:48

Re: Swear Replacement/Filter with Insurgency Support!
 
it freezes when someone post empty message to chat, not empty but just ine space in it. after ayu user type " " in chat server fully frezes

imported_Anth0ny 09-06-2007 03:12

Re: Swear Replacement/Filter with Insurgency Support!
 
don't work at my server...
win32 (sm 1404)

11:12:17 [SM] Listing 34 plugins:
01 "Admin File Reader" (1.0.0.1404) by AlliedModders LLC
02 "Admin Help" (1.0.0.1404) by AlliedModders LLC
03 "Admin Sounds" (1.0) by dalto
04 "Admin loggin" (1.0) by vIr-Dan
05 "Ads" (1.0.2.0) by Shane A. ^BuGs^ Froebel
06 "Advanced c4 Countdown Timer" (1.4) by dalto
07 "Advanced Chat" (1.1) by ferret
08 "Anti-Flood" (1.0.0.1404) by AlliedModders LLC
09 "Advanced Team Attack Control" (1.3.3) by FlyingMongoose
10 "Basic Chat" (1.0.0.1404) by AlliedModders LLC
11 "Basic Commands" (1.0.0.1404) by AlliedModders LLC
12 "Basic Fun Commands" (1.0.0.1404) by AlliedModders LLC
13 "Basic Fun Votes" (1.0.0.1404) by AlliedModders LLC
14 "Basic Info Triggers" (1.0.0.1404) by AlliedModders LLC
15 "Basic Votes" (1.0.0.1404) by AlliedModders LLC
16 "Bounty" (1.0.9.0) by Shane A. ^BuGs^ Froebel, FlyingMongoose, and stoic
17 "Cvar Hider" (1.0.0.0) by AlliedModders LLC
18 "HLstatsX Plugin" (1.3) by Tobi17
19 "Mapchooser" (1.3) by ferret
20 "Nextmap" (1.0.0.1404) by AlliedModders LLC
21 "Quake Sounds" (1.8) by dalto
22 "RateChecker" (0.2) by pRED*
23 "Reserved Slots" (1.0.0.1404) by AlliedModders LLC
24 "RockTheVote" (1.4) by ferret
25 "Client Execute" (1.0.0.3) by dubbeh
26 "Spec for Cash" (1.0.1.0) by Shane A. ^BuGs^ Froebel
27 "Swear Replacement" (1.1) by Hell Phoenix
28 "Terms Agreement" (1.1) by MaTTe
29 "VM VoteBan" (1.0) by ferret
30 "VMgr Core" (0.8) by ferret
31 "VM VoteKick" (1.0) by ferret
32 "VM VoteMap" (1.0) by ferret
33 "Weapon Logging" (1.3) by Tobi17
34 "YeGods High Ping Remover" (1.0.0.4) by dubbeh

Hell Phoenix 09-06-2007 10:00

Re: Swear Replacement/Filter with Insurgency Support!
 
Quote:

Originally Posted by vasp (Post 527539)
it freezes when someone post empty message to chat, not empty but just ine space in it. after ayu user type " " in chat server fully frezes

Thanks for letting me know. I will fix that in the next version.

bzz0 09-06-2007 12:33

Re: Swear Replacement/Filter with Insurgency Support!
 
Hell Phoenix it would be nice to implement ban or kick feature and trigger how many times someone used swearword.

In example we have a trigger 2. When player uses two times swearword it can be kicked or banned from server for sometime.

imported_Anth0ny 09-06-2007 16:25

Re: Swear Replacement/Filter with Insurgency Support!
 
my mistake: all works good...

vasp 09-10-2007 07:40

Re: Swear Replacement/Filter with Insurgency Support!
 
Quote:

Originally Posted by Hell Phoenix (Post 527913)
Thanks for letting me know. I will fix that in the next version.

Great. Any chance to see update this year :) ?

Hell Phoenix 09-13-2007 13:18

Re: Swear Replacement/Filter with Insurgency Support!
 
Cause you have a lot of people typing in a space? I am working on other projects also and dont have time to do it right now. Sorry. Maybe next week.

vasp 09-14-2007 04:05

Re: Swear Replacement/Filter with Insurgency Support!
 
Quote:

Originally Posted by Hell Phoenix (Post 530916)
Cause you have a lot of people typing in a space? I am working on other projects also and dont have time to do it right now. Sorry. Maybe next week.

Sure, a lot of they. Some bad asses knows that bug and freeze my server many times per day, now i removed this plugin :( until fix will avaliable.
Actualy i got message from one of players about that bug - before i even can't understand why that happens.

Hell Phoenix 09-17-2007 12:11

Re: Swear Replacement/Filter
 
This should be fixed in the new version of sourcemod. Please update it.

Falco 09-25-2007 17:56

Re: Swear Replacement/Filter
 
Getting this in logs:
Quote:

L 09/25/2007 - 00:20:41: [SM] Plugin encountered error 15: Array index is out of bounds
L 09/25/2007 - 00:20:41: [SM] Displaying call stack trace for plugin "swear_replacement.smx":
L 09/25/2007 - 00:20:41: [SM] [0] Line 138, /home/groups/alliedmodders/forums/files/3/7/6/4/17848.attach::OnClientPutInServer()

Hell Phoenix 09-26-2007 10:18

Re: Swear Replacement/Filter
 
Thanks for letting me know. I noticed that the other day too and completely forgot about it. Whoops ;)

imported_Anth0ny 09-26-2007 10:30

Re: Swear Replacement/Filter
 
2 Hell Phoenix: please add a config file to plugin (for all plugin's variables)

Hell Phoenix 09-27-2007 13:58

Re: Swear Replacement/Filter
 
New Version:

1.2
* Fixed some errors from the console/log

The errors I fixed dont directly apply to yours Falco, but I have a funny feeling its caused by the same thing. Let me know if you still have them after the new version.

imported_Anth0ny 09-27-2007 14:30

Re: Swear Replacement/Filter
 
Nice work! =)
Please add an autocreation of config file (for all plugin's cvars) feature to mod =).

Hell Phoenix 09-27-2007 15:06

Re: Swear Replacement/Filter
 
Its not really needed, you can just put them in your sourcemod.cfg file.

Falco 09-27-2007 22:34

Re: Swear Replacement/Filter
 
Thanks, I will give it a workout.

imported_Anth0ny 09-28-2007 04:53

Re: Swear Replacement/Filter
 
OMG...

Version 1.2 KILLED all my servers (i install it today) !
All servers instantly crashing if players try to use a chat.

Remove plugin stops crushing.

bzz0 09-28-2007 04:56

Re: Swear Replacement/Filter
 
Hell Phoenix it would be nice to implement ban or kick feature and trigger how many times someone used swearword.

In example we have a trigger 2. When player uses two times swearword it can be kicked or banned from server for sometime.

Falco 09-28-2007 11:58

Re: Swear Replacement/Filter
 
Server crash also

Quote:

L 09/28/2007 - 09:56:41: [SM] Plugin encountered error 15: Array index is out of bounds
L 09/28/2007 - 09:56:41: [SM] Displaying call stack trace for plugin "swear_replacement.smx":
L 09/28/2007 - 09:56:41: [SM] [0] Line 108, /home/groups/alliedmodders/forums/files/3/7/6/4/17848.attach::Read_Files()

Hell Phoenix 09-28-2007 12:25

Re: Swear Replacement/Filter
 
Im really embarassed about that. Sorry. Its funny how an = sign can crash an entire server...lol. Seriously. So without further ado 1.3 has been released and fully tested against crashes ;)

imported_Anth0ny 09-28-2007 13:21

Re: Swear Replacement/Filter
 
10x!
=)

will test it tonight... (at Moscow night now =)) )


All times are GMT -4. The time now is 18:03.

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