Guys can you just shove off a minute, OP has posted some useful and interesting stuff.
TLES, this comment stood out:
'Now my dad was a major flirt and we all knew it but he was totally dedicated to my mum and us children. My mum is in no way a flirt - they were total opposites. '
Also the bit about your never really getting on with women as well as men (same here).
Did you dad behave in a flirty way around everyone - including you? (I don't mean in a sexual way obv)
It sounds as though you have adopted your Dad's persona - you've learned it as a way of interacting, which is natural when a parent does it constantly. However it sounds almost as though you could have sensed your mum's disapproval of your dad, and thus you want to protect him, see your mum (women) as a threat to your loving relationship with your dad (your male friends, now) and want to maintain that 'friendship' above all else, which involves putting the women around them/you down (in their place) as you might have wanted to do to your own mum when she disapproved of your dad.
you're fighting a battle in your head, in your past. Standing up for your dad's way of behaving, and proving yourself the favourite.
You want their approval (also natural) but not the approval of the women.
Once you unravel your motives it can be easier to choose whether to continue or to adapt your actions to be more 'normal' or grown up or whatever.
Well done for being honest, it sounds like you do this flirting thing compulsively, but didn't really understand why. I hope this helps a bit - it isn't your fault, but only you can decide if it's worth continuing or not. Think about how other people really saw your dad...then transpose that onto how people might see you if you behave as he did.