Author Topic: Flood Protection  (Read 1204 times)

I've been studying how flood protection works because I want to use it for one of my scripts. I've found that "spamAlert(%client)" calls the function, am I right? However this is not what I need, I want to check whether the function is called... I've tried "if(spamAlert(%client))" but ignores "if()" and just calls the function. Is there a way I could do this? Thanks.


packaging?
Yes, it's packaged.

EDIT: The code is just a prototype... I refer to my main post.
« Last Edit: July 24, 2010, 12:32:50 PM by General »

what is the overall use for what you are trying to do here?..

what is the overall use for what you are trying to do here?..
If a client says something like "What are the rules?" and is in flood protection, then the rules won't appear.
Why should you need so much info anyways? Haven't I clearly stated what I wanted?

package the function spamAlert and add stuff to do when it's called

if you don't get how to do this, then ask around more

package the function spamAlert and add stuff to do when it's called

if you don't get how to do this, then ask around more
I know what you mean, but how can you "else" a function?

if(%cake)
{
  echo("oh hey look cake");
}
else
{
  echo("oh thats disappointing");
}

if(%cake)
{
  echo("oh hey look cake");
}
else
{
  echo("oh thats disappointing");
}
I've tried that, as I mentioned in the main post...

EDIT: What I ment is how can you "else" a function like "function spamAlert(%client)"
« Last Edit: July 24, 2010, 01:31:23 PM by General »

You don't know what you're doing.
spamAlert() is just meant to turn their flood protection on, and its not supposed to be a value.

You don't know what you're doing.
spamAlert() is just meant to turn their flood protection on, and its not supposed to be a value.
Okay, so is there another way to do this?

Strange though Kalphiter, that if I type "echo(spamAlert(findClientByName(General)));" in the console it returns a value of 0, or 1 if I'm in flood protection.

Strange though Kalphiter, that if I type "echo(spamAlert(findClientByName(General)));" in the console it returns a value of 0, or 1 if I'm in flood protection.
Is spamAlert actually turning on their 10-second period of inability to talk?

Is spamAlert actually turning on their 10-second period of inability to talk?
pretty sure of it

Is spamAlert actually turning on their 10-second period of inability to talk?
I think so, since the value is 1 for 10 seconds.