Modified chat_server to record messages in a chat room