Author Topic: Feature: Customizable word/swear filter  (Read 13081 times)

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Customizable word/swear filter
« Reply #20 on: November 29, 2008, 09:20:33 AM »
I just had a go at making a client side filter: it is enabled/disabled with cl_swearfilter 0/1 and the words are stored in cl_blockedwords, seperated by commas. Strtok makes me want to kill myself.

Here's the patch:
http://www.viciouz.co.uk/other/miscfiles/paintball2_swearfilter.patch

The current list is quite small, and only has a few common words, but I thought I'd leave it like that so people could add their own.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Feature: Customizable word/swear filter
« Reply #21 on: November 29, 2008, 11:18:43 AM »
I'm assuming that the list in cl_parse.c takes priority when the two lists are different (the cl_blockedwords declaration doesn't match in both).


Edit:

I'm not familiar with the DP source (or C for that matter), but do you need to declare the variable twice in two different places?

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Customizable word/swear filter
« Reply #22 on: November 29, 2008, 11:54:37 AM »
It helps to define it in those 2 places, yes. (I think.) The unmatching lists were an accident :o

Updated, now cl_swearfilter 2 drops the chat line.

Might have to change to external files for the swear list, apparently cvars may be limited to 64 characters. Seems alright for most use though.
« Last Edit: November 29, 2008, 01:58:00 PM by ViciouZ »

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Feature: Customizable word/swear filter
« Reply #23 on: November 29, 2008, 04:01:25 PM »
Sounds great :)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Feature: Customizable word/swear filter
« Reply #24 on: January 21, 2009, 10:17:39 AM »
Did you submit this to the CVS?

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Customizable word/swear filter
« Reply #25 on: January 21, 2009, 11:19:32 AM »
Looking back, it seems cervisia has been lying to me about what it has and hasn't uploaded, but this is definitely in the CVS.

Clipz

  • Committee Member
  • Autococker
  • Posts: 1497
Re: Feature: Customizable word/swear filter
« Reply #26 on: January 21, 2009, 11:41:15 AM »
Why? who cares what people say if its a word its meant to be said.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Feature: Customizable word/swear filter
« Reply #27 on: January 21, 2009, 11:43:51 AM »
Because we don't want to hear (or in this case, read) it.

Clipz

  • Committee Member
  • Autococker
  • Posts: 1497
Re: Feature: Customizable word/swear filter
« Reply #28 on: January 21, 2009, 06:00:44 PM »
Maybe it should be a choice to use it or not? I would be pissed if my dp was filtered.. you should be able to choose if yours is or not.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Feature: Customizable word/swear filter
« Reply #29 on: January 21, 2009, 10:44:26 PM »
it is enabled/disabled with cl_swearfilter 0/1

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Feature: Customizable word/swear filter
« Reply #30 on: January 22, 2009, 05:08:53 PM »
Maybe it should be a choice to use it or not? I would be pissed if my dp was filtered.. you should be able to choose if yours is or not.
That's the whole point of making it client side.

Justinph5

  • Autococker
  • Posts: 1159
Re: Feature: Customizable word/swear filter
« Reply #31 on: January 29, 2009, 08:26:25 AM »
I noticed that it takes out the whole line that a player said if it has a blockedword. can it eventually be updated to just block the single word and show the rest of the text?

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Feature: Customizable word/swear filter
« Reply #32 on: January 29, 2009, 12:05:41 PM »
That should just be a setting... What is your cl_swearfilter set to?

Edit: cl_swearfilter 2 will do it.

jits: shouldn't it be disabled by default? Or there could be a setup menu when the game starts for the first time... But I don't think people would be too pleased with a default swear filter, especially current players who are used to the "banter".

Justinph5

  • Autococker
  • Posts: 1159
Re: Feature: Customizable word/swear filter
« Reply #33 on: January 29, 2009, 01:27:04 PM »
k thx, yeah, it was set to 1

edit: and yes it is defaulted to cl_swearfilter 1, which blocks the whole sentence. I say defaulting it off is best, then Zorch could put in a menu for all the new players.

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Feature: Customizable word/swear filter
« Reply #34 on: January 29, 2009, 02:33:00 PM »
k thx, yeah, it was set to 1

edit: and yes it is defaulted to cl_swearfilter 1, which blocks the whole sentence. I say defaulting it off is best, then Zorch could put in a menu for all the new players.

I vote for default 2.

i_am_a_pirate

  • Autococker
  • Posts: 759
Re: Feature: Customizable word/swear filter
« Reply #35 on: February 19, 2009, 07:56:24 AM »
sorry to revive a fairly old thread, but could you have a 1st time setup when you start the program for the first time, setting up (in a wizard style) all the basic stuff, like a swear filter. You could also have it in the setup file (that gets downloaded with the build).
just a thought, maybe it's not really that relevant to this topic

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Feature: Customizable word/swear filter
« Reply #36 on: February 19, 2009, 11:09:05 AM »
sorry to revive a fairly old thread, but could you have a 1st time setup when you start the program for the first time, setting up (in a wizard style) all the basic stuff, like a swear filter. You could also have it in the setup file (that gets downloaded with the build).
just a thought, maybe it's not really that relevant to this topic
You might want to start a new feature vote for a first-time setup guide/wizard.