Query flood protection... - 01/09/03 07:16 PM
This would be very good adition. #)(%*@#% floodclones...
on *:TEXT:*:?: { [color:green]; no need to check if %flood exists. inc will increment to 1 if it doesn't[/color] inc -u5 %flood [color:green]; trigger only when it IS 5 to avoid creating a flood yourself[/color] [color:green]; although there is little to no chance of that with the /ignore in place[/color] if (%flood == 5) { [color:green]; ignore all queries for the next 60 seconds.[/color] [color:green]; not doing this will keep the script triggering over and over and over and over....[/color] ignore -mu60 *!*@* [color:green]; since you used ? for query, you might wanna use -m (query) and not -c (dcc chat),[/color] [color:green]; and leave out the $nick so ALL query windows get closed instead of just the last[/color] [color:green]; nick who msgd you (this will also work against a multiple-nick query flood...)[/color] close -m [color:green]; haltdef? why? there is no reason for it in this code[/color] } }
on ^*:TEXT:*:?:{ if (!%flood) { set -u5 %flood 1 } elseif (%flood <= 5) { inc -u5 %flood } elseif (%flood > 5) { inc -u5 %flood window -c $nick | haltdef } }