02-23-2005, 03:55 AM
I have recently made a chat client and am wondering how you would go about preventing people from spamming the server.
would u use a timmer along with other vars or what?
the sorce files are located here (http://dwalters5304.250free.com/)
open the server first then go and open the client
any help will be helpfull
This is not VB specific, but relevant to any language.
Timers are about the only way you can prevent people from spamming. Every time someone sends a message, record the time. The next time they send a message, just check the time against the last message time, and kill it if it's too close.
You can do the checking in the client rather than the server so that the server isn't spending valuable cpu time running simple tasks like that, but it is easier to make adjustments if the server does all the work (you won't have to redistribute client binaries just to make small changes).
Another idea which I've used is to disable copy/paste to the text entry area, which forces people to actually type in messages rather than spamming in blocks of text with a right mouse click.
02-23-2005, 06:44 PM
how do you go about dissabling the copy past in a text box forum?
i looked but i could not find a property.
would i have to use the key press sub?