mIRC Home    About    Download    Register    News    Help

Print Thread
Repeat last message sent if not sent. #257457 10/04/16 08:37 PM
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
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

Re: Repeat last message sent if not sent. [Re: TUSK3N] #257578 22/04/16 10:20 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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
  }
}