Did I do the wrong thing?

I have recently been talking to my ex (i broke up with him 5 months ago, and we were together for 5yrs) but the conversation has been a little flat. He hasn't suggested seeing me either.
Now he messaged me while i was away on holiday saying that i should be careful of who my friends are and that my best male friend was the cause of our break up. that we would have been happy together for the rest of our lives without him, and he used some pretty awful language to describe him etc. I know now that that particular friend was in love with me. I have since stopped talking to that friend as he is currently engaged and I don't feel anything towards him other than him being my friend.
Anyway, i replied to my ex. I said that I understand now how he felt and that i made mistakes in not being able to see that he was attracted to me. But i also said that the reason i broke up with him was because of him being dishonest about other women, going on multiple dating sites behind my back, and just generally being secretive. I told him that I still loved him but I wasn't willing to be with him again if he couldn't change. I don't want to repeat the same pattern as before and no matter how much i still care for him i can't go through that again if he's going to repeat his behaviour.

I still care for my ex and would like to be with him, but only if he is willing to try to be the man he was a few years ago. Am I wrong for saying all of that to him? Is there a reason why he wouldn't reply to that message?
Did I do the wrong thing?
Add Opinion