I'm so confused right now. Is he flirting with me?

There def. is that. If he gets even a hint that you are interested, he might go blabbing to all his friends and that, and you never really know where that kind of talk could end up.