How to tell if a guy likes you ?

I am having trouble telling if these guy likes me or if he is just being nice. He talked about his ex girlfriend and how it was a bad relationship. We never talked about boyfriends or girlfriends before and he bought me a drink when I told him not to. We joke around, he said of you love me and I am like of course then we laugh. I also can't tell if he flirts with me or not. He has a nickname for me and I told him not to call me that but after he dropped me home from work he called me it as I was getting out of the car and I gave me a look. I am just not sure if he is just being friendly or likes me?