Most MMO's I played do not store messages for a longer period of time. Because that would most likely turn them into a GameCompany with a negative badge like the NSA. Unless, the players had direct access to their database.
Runescape has the messages stored in cache, and it only is avaiable for a small ammount of time. I have never heard of anybody getting banned due to the fact that such data has been stored. If one should ever report another play for what he said. He has to be quick, until his 500~ line chat limit gets used up. After that time all his messages will be deleted. In the most crowdy place, where players shout out each other it is up to 10 seconds.
The messages are always sent via server, and storing takes place at server not client. Otherwise, Player A who hacked into the client, would be able to manipulate the array responsible for chat and literally write that PLAYER B wrote something else. After a short while he could report that player for writing something and the other players cache might no longer hold such info.
If you store the messages on the CLIENT, which has done by a chat portal GaduGadu.pl the users will lose the ability to check their chats on different PC's. The data generated by the user would be vulnerable to third persons. Mostly in public internet Cafes. Or at friends house who might seek vengeance on his former friend.
If you store it on your server, it is impossible for Player B to access data of Player A and vice versa. Keep in mind that saying "can player B access that data" is a broad question. You can never tell if the data is safe, unless your server is offline! Here is an example.