mIRC Home    About    Download    Register    News    Help

Print Thread
flood protect format problem #151945 24/06/06 09:56 AM
Joined: Aug 2004
Posts: 9
T
Terminator2004 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Aug 2004
Posts: 9
This is part of a very long script, but what I was trying to do was to flood protect it. I tried this code, but get an error of wrong format on line 3. It doesn't really need to send the message, just ignore the user for a minute to stop flood issues. Another thing, is my attempt only protected against a single user doing the command, and it really needed to protect against multiple users, so it needed to ignore more than 1 command within 30 seconds.

Code:
on *:TEXT:*:#: {
  if ($1 == !games) {
  if (%gamesignore. [ $+ [ $nick ] ] == 1 { .msg $nick Do Not repeat !games command too fast! }
  else {
    set -u30 %gamesignore. [ $+ [ $nick ] ] 1 
    var %1 = 1
    while ($hget(Games. [ $+ [ $iNetwork ] ] ,$hfind(Games. [ $+ [ $iNetwork ] ], $nick , %1, r).data) != $null) {


Re: flood protect format problem #151946 24/06/06 05:01 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline
Babel fish
Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
right off you need to fix this
Code:
if (%gamesignore. [ $+ [ $nick ] ] == 1[color:red]) [/color] { .msg $nick Do Not repeat !games command too fast! }