As slacker has said,
on *:action:$($+(*,pets,*,$me,*)):#: { if (!%purrflood) { set -u3 %purrflood on | .timer.purr 1 1 describe # purrrrrr.... purrrrrr.... } }
, can be used, however it disables the script all together for three seconds.
To make antispam per person, you can also do
on *:action:$($+(*,pets,*,$me,*)):#: { if ($wildsite !isin %purrflood) { set -u3 %purrflood $addtok(%purrflood,$wildsite,32) | .timerpurr 1 1 .describe # purrrrrr.... purrrrrr... } }
using tokens, or the traditional method:
on *:action:$($+(*,pets,*,$me,*)):#: { if (!%purrflood. [ $+ [ $nick ] ]) { set -u3 %purrflood. [ $+ [ $nick ] ] | .timerpurr 1 1 .describe # purrrrrr.... purrrrrr... } }