He did edit his post with his exact purpose:
"The purpose for this is to detect the bad channel specially the porn bots that always lurks in our channel =)"

And it's actually quite interesting imo.

So, he already has a script that will whois on join, and kick them if they are on a bad channel, for example #sex. But he wants to add a timed check for this as well. So, once every 10 minutes, whois everyone on the channel, and if they are on a bad channel, kick/ban them.