How to restrict who can chat with whom?

A user can communicate only with users in his contacts list. From the Web Control Panel you can edit user contacts lists and so effectively restrict user communication.