Question on a customization issue
by John Helms · in Torque Game Engine · 12/06/2008 (1:49 pm) · 8 replies
I am (for shame) a newbie at this so I apologize if this has been covered elsewhere. I have been searching and as yet have not found exactly what I need.
I was wondering if there were a way to deal with "chat spam"? I am working on a small server project for a game and want to find a way to minimize the usual issues that pop up when someone begins "spamming" other players using a pre-configured chat script.
Can someone point me (gently) in the right direction for a way to deal with entire phrases and how to get rid of them in game on a server so players are not bothered with seeing tons of off topic garbage in their chat windows in game?
Thanks in advance.
I was wondering if there were a way to deal with "chat spam"? I am working on a small server project for a game and want to find a way to minimize the usual issues that pop up when someone begins "spamming" other players using a pre-configured chat script.
Can someone point me (gently) in the right direction for a way to deal with entire phrases and how to get rid of them in game on a server so players are not bothered with seeing tons of off topic garbage in their chat windows in game?
Thanks in advance.
#2
Something where I could list the specific phrases in perhaps a chat.cs file and those phrases be not visible at all in the chat window in game if sent by a player? I know theres stripChars and a bad word replacement function. Might there be anything closer to what I am looking for?
Thanks again
12/06/2008 (4:57 pm)
Maybe I did not present the issue very clearly. I was thinking along the lines of something that blocked specific phrases from a chatpack that is being used to constantly spam in game. I have all the chatpack phrases I wish to block.Something where I could list the specific phrases in perhaps a chat.cs file and those phrases be not visible at all in the chat window in game if sent by a player? I know theres stripChars and a bad word replacement function. Might there be anything closer to what I am looking for?
Thanks again
#3
12/06/2008 (5:04 pm)
Heh, good luck with that. I've never been a fan of blacklisting on content as someone will always find a way to circumvent it. But perhaps there is a solution out there that works. Hopefully someone with more experience in the area can chime in...
#4
if the list of possible phrases is defined by you ahead of time,
then blocking certain ones should be trivial.
but the ingenuity of users is tremendous, and i have yet to see a successful blacklist.
there's even an example of a game for kids where you can only communicate via phrases from a drop-down menu (eg "hi!" "i'm good!" etc), the idea being that it's impossible to give out personal information,
but people will go to the effort of re-arranging the furniture in their virtual house to spell out their phone-number and stuff.
Brian is spot-on, a flood-filter is always good.
another feature your users may appreciate is a way to ignore specific other users.
12/06/2008 (11:21 pm)
What's a chatpack ?if the list of possible phrases is defined by you ahead of time,
then blocking certain ones should be trivial.
but the ingenuity of users is tremendous, and i have yet to see a successful blacklist.
there's even an example of a game for kids where you can only communicate via phrases from a drop-down menu (eg "hi!" "i'm good!" etc), the idea being that it's impossible to give out personal information,
but people will go to the effort of re-arranging the furniture in their virtual house to spell out their phone-number and stuff.
Brian is spot-on, a flood-filter is always good.
another feature your users may appreciate is a way to ignore specific other users.
#5
12/07/2008 (3:11 am)
Start by looking in example/common/server/message.cs, this has a flood chat protection feature. You can modify it to fit your needs.
#6
It sounds to me that John is looking for a catch-all, or a net to catch spammers on the fly.
An example would be those bot players that sell in-game currency. The bot would spam the chat window with
the same text every few seconds. Sometimes changing just the last few words or letters to avoid a catch-all.
eventually the bot loops around and repeats the spam.
If this is what John is looking for, then here is an example text:
goldseller says: Welcome to gamegold.com. 500 gold for just 5.88 usd. we accept paypal.(78
( then 2 or more seconds later)
goldseller says: Welcome to gamegold.com 500 gold for just 5.88 usd. we accept paypal.(42
( then 2 or more seconds later )
goldseller says: Welcome to gamegold.com 500 gold for just 5.88 usd. we accept paypal.(78
He might be looking for a combination of chat time in seconds and a phrase parser to compare with.
Perhaps on client side the phrase can be stored local to the chat channel into a variable.
Allow the player/bot to chat as usual and compare his current chat message with the one saved in the local variable.
If the current chat text matches the local variable value, then do not allow the string to process through chat.
If the current chat text does not match the local variable string, then permit the chat to enter the chat channel time filter.
If the current chat text does not match the local variable string, and the allowed time has elapsed, then permit the chat string to process as usual.
If this is the sort of thing John is looking for, he might be making a valuable asset for games that could potentially get spammers or gold sellers.
Sorry I don't have a code sample for copy paste. just a logic circuit in pseudo-code more or less.
12/07/2008 (5:26 am)
I probably shouldn't respond to this because I don't have a script or code answer for it.It sounds to me that John is looking for a catch-all, or a net to catch spammers on the fly.
An example would be those bot players that sell in-game currency. The bot would spam the chat window with
the same text every few seconds. Sometimes changing just the last few words or letters to avoid a catch-all.
eventually the bot loops around and repeats the spam.
If this is what John is looking for, then here is an example text:
goldseller says: Welcome to gamegold.com. 500 gold for just 5.88 usd. we accept paypal.(78
( then 2 or more seconds later)
goldseller says: Welcome to gamegold.com 500 gold for just 5.88 usd. we accept paypal.(42
( then 2 or more seconds later )
goldseller says: Welcome to gamegold.com 500 gold for just 5.88 usd. we accept paypal.(78
He might be looking for a combination of chat time in seconds and a phrase parser to compare with.
Perhaps on client side the phrase can be stored local to the chat channel into a variable.
Allow the player/bot to chat as usual and compare his current chat message with the one saved in the local variable.
If the current chat text matches the local variable value, then do not allow the string to process through chat.
If the current chat text does not match the local variable string, then permit the chat to enter the chat channel time filter.
If the current chat text does not match the local variable string, and the allowed time has elapsed, then permit the chat string to process as usual.
If this is the sort of thing John is looking for, he might be making a valuable asset for games that could potentially get spammers or gold sellers.
Sorry I don't have a code sample for copy paste. just a logic circuit in pseudo-code more or less.
#7
I took a look at the message.cs file as Joseph suggested. I find a section using the following:
if(( %msgString $= "" ) || spamAlert( %sender ))
Could this be modified to do something like I am after. I would just like to target specific phrases and make them not appear at all. I know they will eventually redo it with new ones. No problem, so will I. :)
BTW hadn't thought of the spammer issue Scott had suggested, I suppose this solution could also tie somehow into a solution for that kind of problem.
I'm not trying to block users from chatting, just reduce the ridiculous spammage that is interfering with normal gameplay.
Thanks
12/07/2008 (6:54 am)
Orion seems to understand what I am referring to. A chatpack is an add on users create containing specified phrases they may think are clever. The particular one I am hoping to kill is being used to constantly fill the chat window with idiotic witticisms. I knew I could go the flood route but I was thinking more along the lines of targeting the specific phrases being used in this particular chatpack.I took a look at the message.cs file as Joseph suggested. I find a section using the following:
if(( %msgString $= "" ) || spamAlert( %sender ))
Could this be modified to do something like I am after. I would just like to target specific phrases and make them not appear at all. I know they will eventually redo it with new ones. No problem, so will I. :)
BTW hadn't thought of the spammer issue Scott had suggested, I suppose this solution could also tie somehow into a solution for that kind of problem.
I'm not trying to block users from chatting, just reduce the ridiculous spammage that is interfering with normal gameplay.
Thanks
#8
ChatPack.
Like Orion said, still reads like using the badword list, unless I am missing the point.
Joseph might have the answer with message.cs, as you've pointed out with
It is a filter for the player spammer or the message string.
That line of code reads like this I think:
If the Condition ( message is equal to "YourSpamWord" ) or Function_SpamAlert ( get the player ID_name first)
and without the rest of the code I would assume it would continue on with a return value True, then it would not be sent, otherwise the message is sent.
I am a bit rusty but.. if both are true then the entire expression is True and the word is filtered out.
Just really interested in this thread you made John. seems like a nice little project. Still trying to get a grasp of what your" pre-configured chat script" really means. Not trying to interfere with an answer.
12/07/2008 (8:06 am)
Torque has a badword.cs file you can use. I guess it's similar to message.cs in that it is used as a filter list.ChatPack.
Like Orion said, still reads like using the badword list, unless I am missing the point.
Joseph might have the answer with message.cs, as you've pointed out with
if(( %msgString $="") || spamAlert( %sender ))
It is a filter for the player spammer or the message string.
That line of code reads like this I think:
If the Condition ( message is equal to "YourSpamWord" ) or Function_SpamAlert ( get the player ID_name first)
and without the rest of the code I would assume it would continue on with a return value True, then it would not be sent, otherwise the message is sent.
I am a bit rusty but.. if both are true then the entire expression is True and the word is filtered out.
Just really interested in this thread you made John. seems like a nice little project. Still trying to get a grasp of what your" pre-configured chat script" really means. Not trying to interfere with an answer.
Torque Owner Brian Wilson
Of course that's not user friendly to your non-spamming users, but it's a bandaide.
You can elaborate by checking the time between the last 3 messages then block them. You can expand it even more that everyone gets 3 instant messages in a time threshold that you put more restrict controls and graduate it up on offence to the point that they are muted completely.