There is one problem with the way you wrote it: The value of $irc_nick will be the last line ( $irc_nick = str_replace('™', '(TM)', $Username); ), all the others will be over written. Try changing it to this:
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.