I've made a similar thing, but I don't know if it works good yet. I need some testers.
http://www.mybbmods.com/forum/showthread.php?tid=285&pid=1501#pid1501
WDZ, did you type all of the ip's, or do you use some kind of database? Because all ip's make a very long code.