Performance: Added a character limit to chat messages (512 characters).