The violent incident took place at around 8pm on March 19 this year, when Kris Rafferty went to the Maltby Progressive Club armed with a metal bar he had found in a nearby alleyway, Sheffield Magistrates' Court heard.
Rafferty, of Markham Road, Edlington went to attack his love rival after he saw him hugging his former girlfriend, the court heard.
"He went over to the male victim and is seen to have struck him three times to the head before other people intervened," said Mark Hughes, prosecuting.
Mr Hughes added: "The defendant was interviewed and said he had intended to go there to harm his victim, who is the new partner of his ex-girlfriend.
"He had gone to Maltby to see her and found she was not home and discovered she had gone drinking with her new partner."
Rafferty's victim suffered reddening and bruising to his head in the attack, but refused to co-operate with the police when asked to provide a statement.
He pleaded guilty to one count of assault, and one count of possessing an offensive weapon at an earlier hearing.
Matt Hague, defending, said in mitigation: "He was egged on to commit the attack by a friend, and had been drinking prior to this happening."
He added: "He pleaded guilty at the very first opportunity, and you will see from the probation report that he is deemed to pose a very low risk of re-offending."
Magistrates sentenced 31-year-old Rafferty to 26 weeks in prison, suspended for two years.
They also ordered him to complete 240 hours of unpaid work, and made him the subject of an eight week curfew, which will be in operation between 7pm and 7am.