Another issue is that a nick name with '+' (very unusual) on it will have the '+' translated to ' ' (space) when the macro '%%user%%' is used.
The reason is that the %%user%% macro for the guest is translated in PHP and the htmlentities in javascript.
To avoid this this will help in class/chat. php parse_message():
$this->message = preg_replace
( '/\+/'
, '+'
, preg_replace
( "/%%user%%/i"
, char_to_html( $_SESSION['hcl_'.$chatid]['guest'] )
, $this->message
)
);