Fix markup parsing problem with player chat

Do some refactoring of the player messaging functions