Nevermind, you won't be able to enter because you're not a member of my forums. I used my chat.php file and your chat room code and plugged it in and it worked for me. Here is my chat.php file for your reference:
PHP Code:
?
require( "global.php" );
if( $bbuserid ) {
$user = $DB_site->query_first( "SELECT username
FROM user
WHERE userid = $bbuserid" );
$bbusername = $user[ username ];
eval("dooutput(\"".gettemplate('chat2_hack')."\");");
} else {
eval("dooutput(\"".show_nopermission()."\");");
} // end if
?>
Change the chat2_hack to chat_hack