Digital Paint Discussion Board
Development => Bugs, Feature Requests, and Feedback => Official Feature Votes => Topic started by: sk89q on January 06, 2008, 01:15:10 PM
-
Customizable word/swear filter
-
hm... this would be good for the older members that are trying to keep a clean environment for their children.
-
http://dplogin.com/dplogin/featurevote/feature.php?id=10046
I assume you're referring to the client-side filter that has been discussed in the past (perhaps somebody could locate that thread and link it for more details).
-
I like this idea because I really hate seeing people using racist language and then getting into a swearing match with someone because they told them to stop. If you don't see the words, you can't get mad.
-
I was hoping for the server-side one :/
-
I dont see a reason to not make this client and server side.
-
Yeah, make it so someone can setup a personal word filter or server admins can control their server better.
-
I don't think many people would give a crap (enough) to turn on word filtering for themselves. However, on servers, admins can reduce fights themselves for everyone.
-
Have it on by default?
-
Is that a good idea? :3
-
No don't turn it on by default.
-
What about a 'first run configuration' type thing where it asks if you wan the filter on or off?
-
Stop trying to take all the fun out of the game.
-
I don't think many people would give a crap (enough) to turn on word filtering for themselves. However, on servers, admins can reduce fights themselves for everyone.
like i said, this would mainly benefit the older members with children that they wish to protect.
-
+1 for this. I was playing today while my dad was watching. Other players were calling each other synonyms for homosexual and other things that made me feel a bit awkward.
-
Server side! Server side! :<
-
Server side! Server side! :<
Do a new request for server side. You need to make your requests less ambiguous.
-
Do a new request for server side. You need to make your requests less ambiguous.
i.e 'more than four words'.
-
I can be specific in four words :P "Customizable server swear filter"
-
Well, I dont know if this helps, but I made this a long time ago: Customisable server side word filter.
I just changed in sv_user.c at the bottom this:
case clc_stringcmd:
s = MSG_ReadString(&net_message);
// malicious users may try using too many string commands
if (++stringCmdCount < MAX_STRINGCMDS)
SV_ExecuteUserCommand(s);
if (cl->state == cs_zombie)
return; // disconnect command
break;With this:
case clc_stringcmd:
s = MSG_ReadString(&net_message);
// malicious users may try using too many string commands
if (++stringCmdCount < MAX_STRINGCMDS)
{
if(strstr(s, "say"))
{
char filter_filename[MAX_QPATH];
char *buf;
int file_len;
sprintf(filter_filename, "%s", Cvar_Get("filter_file", "configs/filter.txt", CVAR_ARCHIVE)->string);
file_len = FS_LoadFile(filter_filename, (void **)&buf);
//if (file_len < 0)
// return;
if (file_len != -1)
{
qboolean keeplooking = true;
char *token;
char *buf2;
// put null terminator at end:
buf2 = Z_Malloc(sizeof(char)*(file_len+1));
memcpy(buf2, buf, file_len);
buf2[file_len] = '\0';
FS_FreeFile(buf);
buf = buf2;
token = text_copy(COM_Parse(&buf));
while(*token)
{
if(keeplooking)
{
if(strstr(s, token))
{
strrep(s, &s, token, "*****");
keeplooking = false;
}
}
token = text_copy(COM_Parse(&buf));
}
}
}
SV_ExecuteUserCommand(s);
}
if (cl->state == cs_zombie)
return; // disconnect command
break;It's probably not be the best way (and its probably buggy) since I made it a long time ago.
Edit: I just remembered strrep was a function I made but I cant remember where it is...
-
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.
-
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?
-
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.
-
Sounds great :)
-
Did you submit this to the CVS?
-
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.
-
Why? who cares what people say if its a word its meant to be said.
-
Because we don't want to hear (or in this case, read) it.
-
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.
-
it is enabled/disabled with cl_swearfilter 0/1
-
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.
-
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?
-
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".
-
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.
-
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.
-
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
-
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.