Most Helpful Guy
It sounds as though your ex may be going through a bit of doubt as to whether he wants to be your ex and not your steady. He also may be trying to see what kind of guy you hook up with and how he may compare. Your Ex I believe is not ready to let go yet and is probably looking for ways he might get back into your good graces.
I'm not completely sure of your situation, Because it also seems as though he is trying to make it look like you and him are still a thing so other guys want try to get with you, Not because he still wants you, but to try and block you from moving on and finding someone else. Which he is having a hard time doing himself. Thats why he ignores you at other times. During those times he ignores you I bet your not around your regular crowd.
I hope I could help a little, Good luck and I hope you find Mr. Right.0