If you're concerned about spam, then maybe consider only letting users with certain roles use the chat.
For example, I have a role on my forum called "Participator". When you sign up, all posts have to be approved. After a few posts, you (manually) get given this role. Once you have the "Participator" role, you can post without moderation and you can use the chat. Works well for me.