That should work if it's in your on text event. Again, you might want to combine bans into a group to avoid really flooding the channel. I usually do that by using $addtok() to add all the addresses to a variable, then when $numtok() says that I have the right number of addresses, I do a ban on that variable and unset it and add more addresses to it. That would be done in your while loop. Then, after the while loop is finished, you would want to check if the variable has anything in it and ban those. That is because you might have been banning in groups of 4, but ended up with 2 in the variable when you finished going through the nicks. So they'd have to be banned separately once the loop finishes.

Also, remember that anyone who was in the channel when you joined and who hasn't said or done anything will not have an $address. You'd need to obtain that by checking one of the commands I listed above with your script whenever the $address() is $null. That or just ban the $nick if the $address is $null.


Invision Support
#Invision on irc.irchighway.net