This is going to come off as harsh, so please understand I don't mean it harshly.
Use your brain!
You've found the right lines. Now look what changed between the old and the new ones according to the hack, then make similar changes to the updated lines in the UBB.
If it doesn't look right, or you aren't sure if what you think you're doing is the right thing, then ask.
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.