mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 3
J
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Apr 2004
Posts: 3
Right, onto the point. I have a very simple remote script that responds to a line by saying something else. However, my flood protection option doesn't work, and I need a script that will limit such query so I won't get killed by server or script-wise kicked by an op for repeating. However, I don't know where to start on setting up this feature, so can anyone show and explain to me a simple flood protector?

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:text:hi:#:{
if !%flood {
msg # hi $nick $+ !
inc -u5 %flood
}
}

that will only respond to "hi" one every 5 secs, that way nobody can deliberately flood you with "hi".


New username: hixxy
Joined: Apr 2004
Posts: 3
J
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Apr 2004
Posts: 3
Tried that script. Unfortunately it didn't work well.

[2:37:36pm] <JackABarter> hi
[2:37:36pm] <@JackATrades> hi JackABarter!inc -u5

And if you don't mind, could you explain what bits and pieces in the script actually do? (like -u5, etc.)

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
the code tags mess up the code, try this one:

on *:text:hi:#:{
if !%flood {
msg # hi $nick $+ !
inc -u5 %flood
}
}

the inc -u5 %flood sets %flood and unsets it after 5 seconds, the if !%flood checks that flood doesn't exist, so it will only work every time %flood unsets itself (once every 5 seconds)


New username: hixxy
Joined: Apr 2004
Posts: 3
J
Self-satisified door
OP Offline
Self-satisified door
J
Joined: Apr 2004
Posts: 3
Okay, that seemed to work. Thanks a lot for the help.

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
yw smile


New username: hixxy

Link Copied to Clipboard