Python 2.7 and the python-wikitools module
Run ./cleanupbot.py to log into the default wiki as the default user, which is CleanupBot on the Amarok wiki (the defaults can be easily edited in the file, or supplied on the command line). It will ask for the password, then print changes.
By default it will check all activity since the bot was last run, though you can also choose to specify a date range. If the bot has not previously run, it will ask for a date range. It will print a numbered list of users with the changes they made. Identify spam accounts and supply a list, range, or list of ranges of the numbers. Make sure you check every user - you don't want to accidentally fry legit users.
Currently it can rollback edits, delete pages, and ban user accounts, and will do this for each selected account.