Now only adds one IP to the table, and counts. Also, changed the order in which it works to make for a better response time while friends try to break my server.