mIRC Homepage
Posted By: TUSK3N Repeat last message sent if not sent. - 10/04/16 08:37 PM
Hello I am using a script for twitch chat and If I send 2 messages at the same time it will not send just give me this error msg

-tmi.twitch.tv:#channel- Your message was not sent because you are sending messages too quickly.

So what I would like it to do is if it receives this message it will wait 2 seconds and send the last messages that was not sent.

I imagine it has to be a text file that stores the latest msg sent and then on text have a timer 2 seconds then read from the textfile but I dont know how to code this can someone help? smile
Posted By: hixxy Re: Repeat last message sent if not sent. - 22/04/16 10:20 PM
Something like:

Code:
on *:input:#:{
  if ($left($1,1) !isin / $+ $readini($mircini,text,commandchar)) { 
    msg # $1-
    set %lastmsg $1-
  }
}
on *:notice:Your message was not sent because you are sending messages too quickly.:#:{
  if (%lastmsg != $null) {
    .timer 1 2 msg # $unsafe(%lastmsg)
    unset %lastmsg
  }
}
© mIRC Discussion Forums