I've updated the attachment in the first post of this thread with a slightly updated script that takes care of some small bugs. If the script works for you there is no need to update. Thanks goes to Omegatron for finding one of the bugs and the fix for it.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.