as i said before, use user levels, when people write and trigger the bot, add them to the user section in mirc.
auser spam $address($nick,3)
then use a timer to remove the user from the user list
auser spam $address($nick,3)
timer 1 60 .ruser spam $address($nick,3)
and then do a match to see if the user is that level, then halt the script if it is.
on *:text:*:#: {
if ($level($address($nick,3)) != spam) {
auser spam $address($nick,3)
timer 1 60 .ruser spam $address($nick,3)
rest of the code
}
this is one way to solve it, but i guess you can find many more ways to get rid of the spammers..
;---- edit
60 in the timer part is the time before the user will be removed and allowed to trigger your bot again. change it to the value you feel is right.