Search code examples
ircmirctwitch

mIRC stop spam of bot - Twitch


Here's my code;

on *:text:!points:#:{ 
  msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points. 
}

Thats ok but if 5 people do !points in a row, it spams the chat. How do I make it update every 10 seconds and then display a message with the points of the people who have asked in that ten seconds but all in one message?


Solution

  • Here is a code that will only take 3 requests in 5 seconds.

    on *:text:!points:#: {
        inc -u5 %flood. [ $+ [ # ] $+ ]
        if (%flood. [ $+ [ # ] ] > 3) {
            return
        }
        msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points. 
    }