This is a fast small script I did a couple days a go to resolve the problem of tons of users and spam that I had in my database using jabberd2/mysql I notes lot of this people that register an account and never log in again are spammers so may as well get rid of them. Here is the code I have put it there so other people can fix/add or whatever with it, if you do please do sent back the changes.
http://github.com/rek2/jabber_clean_spam/tree/master -- http://jabber.binaryfreedom.info http://www.binaryfreedom.info
