Hahaha that's not really a solid first greeting line, if someone did that to me I'd be like :( and run away probably.
If he waves for you to come over ooh that's a toughie, you'd have to be like oh hey! then hug him, if you engage in conversation then going for a hug is a big no no :o