Try being direct in your communication. Set boundaries and let them know what you will and will not tolerate. If they refuse to keep your boundaries than respect yourself and end the friendship.