Obligatory apologies for being a mobile user, first time poster and English not being my first language.  

TLDR at the bottom. 

So, one day I saw a text conversation between my friend and the other guy who I’ll refer to as TOG from now on because I am bad at giving people cool.acronyms and it is currently three in the morning where I live. 

The conversation basically went like this:

TOG: Hey F I’m warning you not to do anything inappropriate to my girlfriend like last time. (F literally only looked at the two of them, nothing more. TOG overreacted)

F: what tf did I do

TOG: Just telling you to keep your distance from my girl at camp

F: don’t you worry I have no interest in your ugly ass gf

TOG: You better watch your language 

F:ok

TOG: You’re no different from rotten firewood, at least I’m superior to you in every way. 

Naturally I went psycho over this and texted TOG to shut tf up. His response was, unsurprisingly, to belittle me on my age (I am  but four months his junior), tell me to go fuck myself in an extremely patronizing tone, and to question my academic results, all of which I replied to by insulting him deeply, quoting TOG on him being superior and a better sport. Needless to say, he did not take this well. 

TLDR: friend is warned by other guy not to look at(not ogle, not even close) his gf, followed by numerous personal attacks, I retaliate and get him back. 
AITA?